Show
Ignore:
Timestamp:
06/05/10 13:59:51 (3 years ago)
Author:
saturday06
Message:

yattoumakuitta...

Location:
lang/objective-cplusplus/i3/trunk/src/mil/include/mil
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • lang/objective-cplusplus/i3/trunk/src/mil/include/mil/Module.h

    r37792 r37803  
    145145    void destroy() { 
    146146        break_loop_request = true; 
     147        semaphore.p(); 
    147148    } 
    148149 
     
    151152        exitNotifier.tls.flush(); 
    152153        ExitEvent e; 
    153         post(e, exitNotifier, event_memory); 
     154        post(e, exitNotifier, event_memory);         
    154155    } 
    155156 
  • lang/objective-cplusplus/i3/trunk/src/mil/include/mil/Pool.h

    r37792 r37803  
    55 
    66#define MIL_DEBUG_PRODUCER   0 
    7 #define MIL_MY_PRODUCER      0 
    8 #define MIL_MALLOC_PRODUCER  1 
     7#define MIL_MY_PRODUCER      1 
     8#define MIL_MALLOC_PRODUCER  0 
    99#define MIL_TBB_PRODUCER     0 
    1010 
  • lang/objective-cplusplus/i3/trunk/src/mil/include/mil/gui-windows/GuiModule.h

    r37802 r37803  
    182182        break_loop_request = true; 
    183183        break_loop_request_shared.store(true); 
     184        semaphore.p(); 
    184185 
    185186        // DestroyWindow -> dtor 
     
    212213 
    213214        for (;;) { 
     215            // dirty if-condition is for most expected branch !? 
     216 
    214217            DWORD wakeup = MsgWaitForMultipleObjects(1, &(semaphore.handle), false, INFINITE, QS_ALLINPUT); 
    215218            if (wakeup == WAIT_OBJECT_0) { 
    216219                execute_front(); 
    217                                 //continue; 
    218220            } 
    219221 
    220222            MSG msg;             
    221223            while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { 
    222                 // dirty if-condition is for most expected branch 
    223224                if (msg.message != WM_QUIT) { 
    224225                    TranslateMessage(&msg); 
    225226                    DispatchMessage(&msg); 
    226                     if (likely(!break_loop_request)) { 
    227                         continue; 
    228                     } 
    229227                } 
    230                                 return; 
    231             } 
     228            } 
     229 
     230            if (likely(!break_loop_request)) { 
     231                continue; 
     232            } 
     233 
     234            return; 
    232235        } 
    233236    }