critical section failing
From: Brad White (bwhite)
Date: 12/30/03
- Next message: Thomas Mueller: "Re: Want to load .ini file depending on XP login."
- Previous message: Pieter Zijlstra: "Re: ChDir and MkDir"
- Next in thread: Mike Shkolnik: "Re: critical section failing"
- Reply: Mike Shkolnik: "Re: critical section failing"
- Reply: Pieter Zijlstra: "Re: critical section failing"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 30 Dec 2003 15:52:57 -0600
Please take a look at this code.
It looks to me like it should write out the
message twice and then deadlock, but
it doesn't. Why??
-------
program Project1;
{$APPTYPE CONSOLE}
uses
SysUtils,
StrUtils,
SyncObjs;
var
Lock : TCriticalSection;
StackCount : Integer;
procedure doDeadLock;
begin
WriteLn(Format('Doing Deadlock (%d)',[StackCount]));
Inc(StackCount);
Lock.Enter;
doDeadLock;
end;
begin
Lock := TCriticalSection.Create;
doDeadLock;
end.
-----------
Happy New Year,
Brad White
- Next message: Thomas Mueller: "Re: Want to load .ini file depending on XP login."
- Previous message: Pieter Zijlstra: "Re: ChDir and MkDir"
- Next in thread: Mike Shkolnik: "Re: critical section failing"
- Reply: Mike Shkolnik: "Re: critical section failing"
- Reply: Pieter Zijlstra: "Re: critical section failing"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|