Re: [Python-Dev] Non-blocking (asynchronous) timer without thread?

2006-12-22 Thread Evgeniy Khramtsov
Bob Ippolito пишет: > Well you simply can't do what you propose without writing code in the > style of Twisted or with interpreter modifications or evil stack > slicing such as with stackless or greenlet. If you aren't willing to > choose any of those then you'll have to live without that > functi

Re: [Python-Dev] Non-blocking (asynchronous) timer without thread?

2006-12-22 Thread Evgeniy Khramtsov
Josiah Carlson пишет: >writing of a scheduler and the execution of scheduled tasks in a >scheduler? If so, you can implement it today (I would suggest using the >heapq module, and/or the pair heap I posted to this list a few weeks ago), >or you can use a previously existing mainloop for handling

Re: [Python-Dev] Non-blocking (asynchronous) timer without thread?

2006-12-22 Thread Evgeniy Khramtsov
Mike Klaas пишет: > I'm not sure how having python execute code at an arbitrary time would > _reduce_ race conditions and/or deadlocks. And if you want to make it > safe by executing code that shares no variables or resources, then it > is no less safe to use threads, due to the GIL. > Ok. And wha

[Python-Dev] Non-blocking (asynchronous) timer without thread?

2006-12-22 Thread Evgeniy Khramtsov
The question to python core developers: Is there any plans to implement non-blocking timer like a threading.Timer() but without thread? Some interpreted languages (like Tcl or Erlang) have such functionality, so I think it would be a great feature in Python :) The main goal is to prevent threads