
30 Dec
2007
30 Dec
'07
10:28 p.m.
On Sun, Dec 30, 2007 at 04:57:47PM -0500, David Roundy wrote:
We could fork a process that waits one second and then uses XSendEvent() to send a message to the other, and then exits. This seems reasonably elegant. It avoids the need for an external binary, it's moderately efficient (probably more so than execing a new binary), and we could even encapsulate it in a simple function.
The problem is that the forked thread will be blocked too as long as the main thread is blocked by XNextEvent. In xmobar Spencer came up with a version of XNextEvent that doesn't block in a foreign call, so that it can be interrupted by an asynchronous exception. This is not going to be feasible in xmonad, unfortunately. Andrea