[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ns] Incorrect event handling at ns scheduler stop?
I think so. I've checked it in and should be fixed in tomorrow's snapshot.
Thanks.
- Haobo
On Thu, 19 Oct 2000, Thomas Kaemer wrote:
> Hello!
>
> I have a question about the event queue. I'm afraid an event is lost
> everytime the scheduler is stopped. If I understand the source code
> correctly, there is a scheduler bug.
>
> scheduler.cc:
>
> | void
> | Scheduler::run()
> | {
> | instance_ = this;
> | Event *p;
> | while ((p = deque()) && !halted_) {
> | dispatch(p);
> | }
> | }
>
>
> In the while loop header the next event is taken (p = deque())
> and then the halted_ variable is checked. If halted_ is equal
> to 1 the scheduler stops its work and the dequeued event is not
> handled.
>
> Is my conclusion correct and can I exchange both expressions
> in the while header without other side effects?
>
>
> Yours sincerely
> Kaemer
>