[Ns-bugs] [Bug 631] RealtimeSimulatorImpl not compatible with python bindings
code@nsnam.ece.gatech.edu
code at nsnam.ece.gatech.edu
Mon Jul 13 05:49:16 PDT 2009
http://www.nsnam.org/bugzilla/show_bug.cgi?id=631
--- Comment #9 from Gustavo J. A. M. Carneiro <gjcarneiro at gmail.com> 2009-07-13 08:49:16 EDT ---
(In reply to comment #7)
> (In reply to comment #6)
> > > The realtime scheduler problem is a different one. But a solution to it is not
> > > trivial. I think we should just add some way to find out whether the
> > > implementation supports RunOne and avoid calling it if not. Naturally if we do
> > > not call RunOne then we'll not catch Ctrl-C, but at least the simulator will
> > > work from python automagically.
> > >
> > > After that we can try to get Ctrl-C to work again, maybe using threads as you
> > > suggest, but to be honest I think it is more work than the feature is worth...
>
> what I wanted to point out but forgot to is that it should be perfectly
> possible to add a Simulator::SetMonitoringCallback (Callback<void> cb);
> which is called regularly by the simulation code and you could call
> PyErr_CheckSignals from that callback. [other variants on this theme are easy
> to code]
Calling PyErr_CheckSignals for _every_ scheduler iteration is bad for
performance, because you also have to acquire the Python GIL (Global
Interpreter Lock). The current code does this every 100 events by default.
Also without RunOne you will make me jump through hoops in order to get
real-time visualization to work (assuming I will have time one day to port
ns-3-pyviz to ns-3-dev). Not nice.
>
> The key here is that it allows the simulator code much more leeway in doing
> what it needs to do.
>
All I ask is to keep the default (and most important one!) scheduler to work as
before. Forget about parallel/realtime/whatever, those are cool but not
exactly what most people are going to use. I think you are giving it excessive
importance. No offense intended to whoever is putting hard work into
implementing them! :)
--
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the Ns-bugs
mailing list