This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author felipecruz
Recipients amaury.forgeotdarc, felipecruz, jcea, pitrou
Date 2012-11-29.02:47:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1354157269.43.0.696632190945.issue16565@psf.upfronthosting.co.za>
In-reply-to
Content
Just confirmed that signals is not a viable option. Is too slow, as Antonie already pointed. It's almost 5 times slower than with SIGEV_THREAD. 

The problem now is:

If I use Py_AddPendingCall, the tests can hang sometimes. I can still follow Amaury suggestion tough.

If I try to acquire the GIL PyGILState_Ensure() call PyObject_CallObject and release the GIL in the aio_completion_handler function a SEGFAULT occurs in 2.7.3 but not in 3.3 and newer..

This branch works only on 3.3 and newer: https://github.com/felipecruz/pyaio/tree/feature/check_no_pending_call

This other branch will segfault 2.7.3 with just acquire and release GIL on the completion handler:
https://github.com/felipecruz/pyaio/tree/feature/py27_gil_error

Since this looks very strange, can someone confirm this behavior?

Tested on a Ubuntu12 64.
History
Date User Action Args
2012-11-29 02:47:49felipecruzsetrecipients: + felipecruz, jcea, amaury.forgeotdarc, pitrou
2012-11-29 02:47:49felipecruzsetmessageid: <1354157269.43.0.696632190945.issue16565@psf.upfronthosting.co.za>
2012-11-29 02:47:49felipecruzlinkissue16565 messages
2012-11-29 02:47:48felipecruzcreate