Bug 1399 - event loop needs to wake up when an event is added asynchronously
Summary: event loop needs to wake up when an event is added asynchronously
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P1 normal
Target Milestone: ---
Assignee: Andrew Cagney
Depends on:
Blocks: 1580
  Show dependency treegraph
Reported: 2005-09-30 16:15 UTC by Andrew Cagney
Modified: 2005-10-29 15:19 UTC (History)
1 user (show)

See Also:
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Cagney 2005-09-30 16:15:28 UTC
The event loop needs to be woken up when an event is appended asynchronously; at
present it only gets around to processing such events when a pre-existing event
is fires.
Comment 1 Andrew Cagney 2005-10-08 16:40:13 UTC
2005-10-08  Andrew Cagney  <cagney@redhat.com>

        * EventLoop.java: Extend Thread.  Set .tid in .runEventLoop.  Wrap
        .runEventLoop code in a try.finally to ensure that on return
        .isGoingToBlock is clear.

        * TestEventLoop.java: Add SleepThread to testAsync.

        * TestEventLoop.java: Add testAsync, and helper classes
        EventThread, TimerThread, and SignalThread.
        * EventLoop.java: Add private .tid, .isGoingToBlock,
        .wakeupIfBlocked.  In constructor, add Sig.IO to the signal set.
        Instead of synchronised .timerEvents, .pendingEvents, and
        .signalHandlers, make the accessor methods synchronised.  Add
        .wakeupIfBlocked calls, and updates to .isGoingToBlock where

        * EventLoop.java: Add .remove, and .runEventLoop.  Rewrite
        .runPending, .runPolling, and .run to use .runEventLoop.  Replace
        .millisecondsToNextTimer with getTimerEventMillisecondTimeout.
        Relocate .requestStop, and .checForTimerEvents.

        * TestEventLoop.java: Use Tid.get, add .eventTid replacing Pid.get

2005-10-07  Andrew Cagney  <cagney@redhat.com>

        * EventLoop.java: Make pendingEvents a synchronizedList.  Rename
        .appendEvent to .add.  Add method .addToPending.
        * TestEventLoop.java: Update.

        * Signal.java: New.
        * SignalEvent.java: Extend Signal.java.
        * EventLoop.java: Update.  Make .signalHandlers a Map.  Rename
        .addHandler to .add.
        * TestEventLoop.java: Update.

        * TimerEvent.java: Add .getTimeMillis, modify .reSchedule so that
        it returns true if a re-schedule is required.  Rename .value to
        .timeMillis, and .period to .periodMills, make private.
        * EventLoop.java: Update.  Make .timerEvents a SortedMap, rename
        .addTimerEvent to .add,
        * TestEventLoop.java: Update.

2005-10-07  Andrew Cagney  <cagney@redhat.com>

        * Tid.java, cni/Tid.cxx: New.