Ignore:
Timestamp:
Jan 26, 2011, 7:58:27 PM (14 years ago)
Author:
george
Message:
  • Fixed: Micro threads freeing.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • MicroThreading/UMicroThreading.pas

    r149 r150  
    275275        mov eax, StaticMicroThread
    276276        mov edx, [eax].TMicroThread.FStackPointer
     277        mov ecx, esp
    277278        mov esp, edx
    278279        push ebp // remember bp on micro thread stack for read back
     280        push ecx
    279281        mov edx, [eax].TMicroThread.FBasePointer
    280282        mov ebp, edx
     
    282284      StaticMicroThread.Execute;
    283285      asm
     286        pop edx
    284287        pop ebp
     288        mov esp, edx
    285289      end;
    286290      //FSelected.Method(FSelected);
    287       StaticManager := FCurrentMicroThread.FManager;
     291  (*    StaticManager := FCurrentMicroThread.FManager;
    288292      asm
    289293        // Restore FScheduler stack
     
    294298        mov ebp, edx
    295299      end;
     300*)
    296301      FCurrentMicroThread.FManager := nil;
    297302      FCurrentMicroThread.FExecutionEndTime := CurrentTime;
     
    561566  try
    562567    FThreadPoolLock.Acquire;
     568    FThreadPool.OwnsObjects := False;
    563569    FThreadPool.Delete(FThreadPool.IndexOf(Sender));
     570    FThreadPool.OwnsObjects := True;
    564571  finally
    565572    FThreadPoolLock.Release;
Note: See TracChangeset for help on using the changeset viewer.