Skip to content
Snippets Groups Projects
  • Guy Zana's avatar
    c5dbdcc8
    bsd: rewrite callout mechanism to avoid a race · c5dbdcc8
    Guy Zana authored
    the old implementation used threads for dispatching callouts, each callout
    owned a thread and it suffered from a race where a callout structure could have
    been deleted before the callout thread even begun.
    
    the current implementation is dispatching all callouts in a single callout
    dispatcher thread, it maintains an ordered list of callouts to achieve that.
    
    this patch solve a crash with the TCPDownloadFile test, that now proceeds.
    c5dbdcc8
    History
    bsd: rewrite callout mechanism to avoid a race
    Guy Zana authored
    the old implementation used threads for dispatching callouts, each callout
    owned a thread and it suffered from a race where a callout structure could have
    been deleted before the callout thread even begun.
    
    the current implementation is dispatching all callouts in a single callout
    dispatcher thread, it maintains an ordered list of callouts to achieve that.
    
    this patch solve a crash with the TCPDownloadFile test, that now proceeds.
net.cc 2.01 KiB