2
votes
Vote UpVote

Value Never Used – Or Is It?

The Delphi Geek – Sometimes, dcc32 is just plain stupid … I have this code in the OmniThreadLibrary:function TOmniThreadPool.Cancel(taskID: int64): boolean;var res: TOmniWaitableValue;begin {$IF CompilerVersion >= 22} Result := false; // not really used {$IFEND} res := TOmniWaitableValue.Create; try otpWorkerTask.Invoke(@TOTPWorker.Cancel, [taskID, res]); res.WaitFor(INFINITE); Result := res.Value; finally FreeAndNil(res); end;end;The IFDEF part is there because otherwise compiler complains about result being potentially undefined.[DCC Warning] OtlThreadPool.pas(1315): W1035 Return value of ...
Favorite? Off-Topic? gabr @ 2015-04-25 13:57

Statistics

Visits: 812
Votes: 2
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Alister Christie
VICovSki
Subscribe:
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News

Sponsor

 
Please login or register to use this functionality.
(click on this box to dismiss)