from recent forum threads elements i assume the following  
'macro-situation':


(0) python libraries selected for a project should be thread-safe

(1) user uses python libaries at his own risk (there 's no mean to verify 
it's thread-safe)

(2) in order to minimize risks user should put a lock around all code using 
the libraries :


def dangerous() :
     with lock_libraryA : 
         do something with libraryA 
     with lock_libraryB : 
         do something with libraryB



(3) in case of application crashes where libraries are involved means 
libraries cannot be used and designers should look for alternatives 


is this correct ?


As regard the dangerous code 'micro-situation': 

I think it' ll be ok to lock between threads. One line of code instantiates 
the main library object (constructor takes 2 files arguments). Is that a 
potential problem at the process level ? (code is readonly nothing is  ever 
written to the files)


As regard processes concurrency :

Doing tests with several scheduler processes and lot's of tasks, i have had 
deadlocks so i wondered if postgreSQL Lock command could help prevent that ?

https://www.tutorialspoint.com/postgresql/postgresql_locks.htm



thanks guys for your support……. 



 @Dave : quote by Nietzsche 

« Partout on entend la voix de ceux qui prêchent la mort : et la terre est 
pleine de ceux à qui il convient de prêcher la mort. »




-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to