home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.c++.moderated      Moderated discussion of C++ superhackery      33,346 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 32,562 of 33,346   
   fmatthew5876 to All   
   Re: IO thread, block or destroy/recreate   
   25 Sep 12 13:29:07   
   
   From: fmatthew5876@googlemail.com   
      
   { Reformatted; please limit your lines to 70 characters -mod }   
      
   > IOW he could call getpid 75,000 times in 1/60 of a second.  Give or   
   > take an order of magnitude, you probably can, too.   
      
   Theres also the added benefit that every time I poll by calling   
   is_done() in addition to checking if the iothread is done it also goes   
   and does some work in the main thread, distributing main thread work   
   across several frames.   
      
   Game resources have a load() function thats done in the iothread which   
   does all the disk IO, and then an optional bringin() function thats   
   done in the main thread to do any setup that needs to interact with   
   the rest of the system. It avoids the need for expensive and   
   complicated locks all over the place. Each time the user calls   
   is_done() it will check to see how many resources have finished   
   loading and bring them in. When the user finally does flush(), most of   
   the resources are already in   
      
      
   --   
         [ See http://www.gotw.ca/resources/clcm.htm for info about ]   
         [ comp.lang.c++.moderated.    First time posters: Do this! ]   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca