Bug 351

Summary: Python: ns3.Schedule + import threading == crash
Product: ns-3 Reporter: Gustavo J. A. M. Carneiro <gjcarneiro>
Component: python bindingsAssignee: ns-bugs <ns-bugs>
Status: RESOLVED FIXED    
Severity: major    
Priority: P1    
Version: ns-3.2   
Hardware: All   
OS: All   
Attachments: patch

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).