Post Profile






CodeSOD: Non-Threading

Reader Tyler shares this outstanding example of thread evasion: Apparently they needed a way to delay current execution but still process window messages, and running it in a separate Thread and calling Sleep() would have been too hard... Thankfully this function isn't actually being used anymore, and has been canned from the repo. Thankfully, indeed. Come for the honest commenting, stay for the funky definition of one second, the adding of seconds that I think is supposed to represent real time ticking by as the function runs, the countup (countdowns are lame), and the invocation of Application.
read more

share

Related Posts


Thread Synchronization - UI thread and Worker thread

Programming / Windows Development : CodeProject

This article describes how a Worker thread can take the control of the UI and can update the UI, created by the UI thread. This will be useful when a worker thread needs to update the UI in the mid of the background processing or on...

Thread below the Gardening Thread: Halloween in Academia [KT]

US Politics / Conservative : Ace of Spades HQ

Serving your mid-day open thread needs Think Disney villains are the scariest things in the Magic Kingdom? Not according to a scholarly report from last year. Is it possible that the kind of stereotypical language in the paper quote...

Advanced: optimized thread for making function calls, including return values

Programming / Windows Development : CodeProject

C++11 header-only class, executes functions on a separate thread, including return values. Featuring a unique custom built, low level, lock-free double buffered queue; with a high speed data format, executes a queue of functions in ...

A reusable ProgressViewModel to observe progress with MVVM

Programming / Windows Development : CodeProject

UI and code behind is executed in different threads. Long running processes need asynchrone execution. This artice shows a way of doing this in a ViewModel approach.

Repainting WinForms windows safely inside a processing loop (safe DoEvents)

Programming / Windows Development : CodeProject

This example illustrates the correct use of Application.DoEvents() in order to allow a window to repaint (or handle the desired messages) while its thread is busy doing heavy processing.

Comments


Copyright © 2016 Regator, LLC