Why not easy Thread synchronization?
Iwan van der Kleyn
null at null.com
Tue May 13 15:42:42 EDT 2003
It's very easy writing simple threaded programs in Python. In fact, its
part of my "evangelize demo's" :-)
However, thread synchroni(s/z)ation seems to be a bit more fussy and
complex then, for example, Java.
Why not a "synchronization" reserved word like in Java which takes care
of "scary" bits under the hood?
For example:
sync def log(s): #in which the hypothetical keyword 'sync' makes the
function 'log' thread safe
sys.stout.write(s)
sys.stout.flush()
Seems to be a bit more fitting to Python mucking about with locks and
mutexes.
Regards,
Iwan
More information about the Python-list
mailing list