Tag Info

New answers tagged

1

If you get these items in batches, then it obviously makes sense to use events that notify about changes once per batch: public class AllChannelsSaver { public void Add(IEnumerable<ChCell> cells) { this.m_cells.Add(cells); this.OnCellsAdded(cells); } public event EventHandler<MultipleCellsAddedEventArgs> ...


1

You can mix several tasks in a single threaded loop, e.g. by using idle functions (as I explained here). So with a GUI event loop, when some external event happens (e.g. the user presses a button), the callback could add an idle function into the loop. Then it is important that the idle function gives back the control to the event loop quite quickly ...


1

The OS creates events and feeds it into the OS-supplied Event queue which the application polls in the event loop. In Windows that is with GetMessage and friends. Windowing frameworks (java's swing, Qt etc.) will implement this loop for you and allow you to insert your own custom events.



Top 50 recent answers are included