diff --git a/uppsrc/Core/src.tpp/CoWork_en-us.tpp b/uppsrc/Core/src.tpp/CoWork_en-us.tpp index c8d660191..ce9b7a9bd 100644 --- a/uppsrc/Core/src.tpp/CoWork_en-us.tpp +++ b/uppsrc/Core/src.tpp/CoWork_en-us.tpp @@ -94,13 +94,13 @@ oid]_()>`&_[*@3 fn])&] [s5;:Upp`:`:CoWork`:`:operator`*`(Upp`:`:Function``&`&`): [_^Upp`:`:CoWork^ C oWork][@(0.0.255) `&]_[* operator`*]([_^Upp`:`:Function^ Function]<[@(0.0.255) void]_()>`& `&_[*@3 fn])&] -[s2;%% Schedules [%-*@3 fn] to be run on all worker threads. After -the first thread returns from [%-*@3 fn], all other scheduled [%-*@3 fn] -jobs that has not started yet are unscheduled. Waits for all -started jobs to finish. The function also sets internal index -counter to zero in CoWork before starting any worker thread. -Worker thread should acquire job quantum in internal loop `- -internal CoWork index can be used for this purpose.&] +[s2;%% Schedules [%-*@3 fn] to be run on all worker threads and on +calling thread. After the first thread returns from [%-*@3 fn], +all other scheduled [%-*@3 fn] jobs that has not started yet are +unscheduled. Waits for all started jobs to finish. The function +also sets internal index counter to zero in CoWork before starting +any worker thread. Worker thread should acquire job quantum in +internal loop `- internal CoWork index can be used for this purpose.&] [s3;%% &] [s4; &] [s5;:Upp`:`:CoWork`:`:Next`(`): [@(0.0.255) int]_[* Next]()&] diff --git a/uppsrc/GLCtrl/Win32GLCtrl.cpp b/uppsrc/GLCtrl/Win32GLCtrl.cpp index 7018c780e..708682b5f 100644 --- a/uppsrc/GLCtrl/Win32GLCtrl.cpp +++ b/uppsrc/GLCtrl/Win32GLCtrl.cpp @@ -103,7 +103,6 @@ void GLCtrl::GLPane::State(int reason) LRESULT GLCtrl::GLPane::WindowProc(UINT message, WPARAM wParam, LPARAM lParam) { if(message == WM_PAINT && s_openGLContext) { - static int i = 0; PAINTSTRUCT ps; HWND hwnd = GetHWND(); BeginPaint(hwnd, &ps); diff --git a/uppsrc/Painter/Render.cpp b/uppsrc/Painter/Render.cpp index 5d5866d87..c69adcae7 100644 --- a/uppsrc/Painter/Render.cpp +++ b/uppsrc/Painter/Render.cpp @@ -333,6 +333,7 @@ void BufferPainter::FinishPathJob() { if(jobcount == 0) return; + CoWork co; co * [&] { for(;;) {