Bug 351 - Python: ns3.Schedule + import threading == crash
Python: ns3.Schedule + import threading == crash
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: python bindings
ns-3.2
All All
: P1 major
Assigned To: ns-bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-17 10:50 UTC by Gustavo J. A. M. Carneiro
Modified: 2008-09-18 00:00 UTC (History)
0 users

See Also:


Attachments
patch (1008 bytes, patch)
2008-09-17 10:50 UTC, Gustavo J. A. M. Carneiro
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gustavo J. A. M. Carneiro 2008-09-17 10:50:16 UTC
In some manually written code I forgot to acquire/release the Python GIL.  The patch is small but important.
Comment 1 Gustavo J. A. M. Carneiro 2008-09-17 10:50:50 UTC
Created attachment 257 [details]
patch
Comment 2 Mathieu Lacage 2008-09-17 12:34:54 UTC
This patch looks good to me for ns-3-dev as of now. You would need to get approval from tom or craig before commiting though.
Comment 3 Gustavo J. A. M. Carneiro 2008-09-17 18:20:14 UTC
Craig?  Let your verdict be known.  Leave it as P1 and commit, or move it to P3?

My opinion as maintainer of the Python bindings is to commit.  It's a trivial fix and has zero chance of breaking compilation even on weird platforms (the function PyEval_ThreadsInitialized() is Python 2.4+ only, but there is a compatibility macro for older Pythons).