• Martin Martin's avatar
    When you read from a default-constructed MPMCQueue, assert instead of SIGFPE. · 8712f361
    Martin Martin authored
    Summary:
    I accidentally forgot to specify the capacity for my
    MPMCQueue.  When I then did a blockingRead(), I got a SIGFPE.  Thanks
    to a custom signal handler that doesn't print stack traces, and a few
    more comedy of errors, I lost a day to this.  With this patch, I would
    have gotten an assertion failure instead.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D4169033
    
    fbshipit-source-id: fab97ea0d5afc3c06885758b31a5e8c91ae75a45
    8712f361
MPMCQueue.h 53.3 KB