Browse by Tags

Tagged Content List
  • Blog Post: Threadpool

    So I've checked in the new Longhorn threadpool. (Unmanaged). If you use the threadpool, I think you'll enjoy it; there are a number of API features which should make it very easy to write correct code which uses it, particularly in the area of cleanup and dll unload synchronization, which the old QueueUserWorkItem...
  • Blog Post: Hungarian

    (In this post, I demonstrate just how young I am; I'm sure this stuff's been hashed out many times over the years...) So, I like Hungarian notation. This puts me at odds with most of my colleagues, who intensely dislike it. The few times it's come up, though, I'll ask them, "Have you read something by...
  • Blog Post: Yet another reason not to handle all SEH exceptions

    ... you'll probably forget to call _resetstkoflw() in your exception handler when it's a stack overflow exception. This re-establishes the guard page, so that the next time the thread hits a stack overflow, it'll get another stack overflow exception; if you forget to call it, then the next time the thread...
  • Blog Post: SEH stack walking

    I noticed another fun thing about structured exception handling the other day; it's probably old news to the compiler team, but I thought it was interesting. Imagine you have code like this: DoSomething(); // This may raise an exception. try { *x = NULL; // This may raise an exception, too. ... } On...
  • Blog Post: SEH Ordering

    A number of devs don't quite understand the order of operations in structured exception handling. This leads to some interesting bugs... Take this snippet of pseudocode, for example: try { EnterCriticalSection(); try { DoSomething() RaiseException(); DoSomethingElse(); } finally { LeaveCriticalSection...
Page 1 of 1 (5 items)