Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~245 People Reached
Favorite Forums
Favorite Tags
Member Avatar for john111smith

Hi all now, for testing modified codes, i encounter a problem. please consider the following code: [code=delphi] procedure MyThreadNum5(Data: Pointer) var i:integer; begin 1 lockvar.BeginRead; 2 try 3 i:=NumOfRxData; 4 finally 5 lockvar.EndRead; 6 end; .... end; [/code] the above thread freezes on line #1; while in the main vcl …

Member Avatar for radu84
0
154
Member Avatar for john111smith

in the borland delphi help 2006 : Note that a write lock operation is not atomic. Data in protected memory will always be in a consistent state when BeginWrite returns, but is not necessarily in the same state as when BeginWrite was called. As a rule, a thread should always …

Member Avatar for radu84
0
91