[DUG] XE Upgrade

Jolyon Smith jsmith at deltics.co.nz
Wed Sep 1 13:35:12 NZST 2010


OK, first of all you _probably_ shouldn't be using Suspend/Resume all the
time.  :)

BUT

They have "deprecated" the methods for only one reason:

 -  They are not valid for general purpose thread synchronisation

This is true of any number of things however, which don't get deprecated.


However, in D2010 they introduced the ability for the debugger to
freeze/thaw threads - my guess is that this facility uses Suspend/Resume.
As a result, application code that also uses Suspend/Resume is now perhaps
likely to have unintended consequences when interacting with the debugger
(if using freeze/thaw).

My guess this is why they "deprecated" the methods, but imho what they
should instead have done is simply properly documented them and the caveats
pertaining to their use (even in D2010 there is at least *some*
documentation along these lines, but perhaps not enough).


Just my 0.02

-----Original Message-----
From: delphi-bounces at delphi.org.nz [mailto:delphi-bounces at delphi.org.nz] On
Behalf Of Robert martin
Sent: Wednesday, 1 September 2010 12:03
To: NZ Borland Developers Group - Delphi List
Subject: Re: [DUG] XE Upgrade

  Hi

I read the suspend / resume note with surprise!  I had not realised that 
was the case, we use suspend and resume regularly.  I note it recommends 
using TEvent and TMutex instead.  I am somewhat confused, how am I 
supposed to pause (suspend) a thread ?  I cant see any examples on their 
wiki page.

Cheers
Rob

> Also in the "VCL/RTL Changes" TThread.Suspend/Resume were (incorrectly,
> imho) *already* deprecated in Delphi 2010 iirc and moving classes from
unit
> A to unit B... useful to know but not exactly worth highlighting in this
> sort of changes summary.
>
>
_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: delphi at delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-request at delphi.org.nz with Subject:
unsubscribe



More information about the Delphi mailing list