Guest:
Register
|
Login
|
Member List
|
Search
|
Statistics
|
FAQ
Language
----------
Simplifed Chinese
Traditional Chinese
English
CnPack Forum
»
技术板块灌水区
» 读《在delphi中使用go语言的并发编程方法》,请教大家个语法问题
‹‹ Last Thread
|
Next Thread ››
Poll
Trade
Reward
Activity
Printable Version
|
Email to Friend
|
Subscription
|
Favorites
Subject: 读《在delphi中使用go语言的并发编程方法》,请教大家个语法问题
vinge
新警察
UID 67737
Digest Posts 0
Credits 15
Posts 5
点点分 15
Reading Access 10
Registered 2012-11-14
Status Offline
#1
Post at 2012-11-23 11:00
Profile
|
Blog
|
P.M.
读《在delphi中使用go语言的并发编程方法》,请教大家个语法问题
coroutineUnit.pas里有个procedure go(f: TProc);
procedure go(f: TProc);
begin
TThread.CreateAnonymousThread(f).Start();
end;
调用时用go(
procedure()
begin
Sleep(10000);
c.value:=1;
end);
这是哪方面的语法?有人说是回调。在李维的《浅谈如何使用Delphi 2009的泛型容器类别》里有个类似的例子,是在泛型结合匿名函数里讲的。
还有一个问题,如果想向go()传递一个带参数的procedure时,会出现编译错误,那应该怎么做?
请大家指教,谢谢。
Poll
Trade
Reward
Activity
CnPack Forum
CnPack English Forum
> CnWizards IDE Wizards
> CVSTracNT
> Announcements & Others
All times are GMT++8, the time now is 2024-11-23 19:58
Powered by
Discuz!
5.0.0
© 2001-2006
Comsenz Inc.
Processed in 0.009328 second(s), 7 queries , Gzip enabled
TOP
Clear Cookies
-
Contact Us
-
CnPack Website
-
Archiver
-
WAP
Member's CP Home
Edit Profile
Credits Transaction
Public User Groups
Buddy List
Main
Page Views
User Agents
Posts History
Top Forums
Top Threads
Post Ranking
Credit Ranking
Online Time
Team
Moderation Stats