{"id":2254,"date":"2015-04-07T16:51:16","date_gmt":"2015-04-07T08:51:16","guid":{"rendered":"http:\/\/blog.qdac.cc\/?p=2254"},"modified":"2015-04-07T16:51:34","modified_gmt":"2015-04-07T08:51:34","slug":"qworker-%e6%9b%b4%e6%96%b0-%e7%ae%80%e5%8c%96%e5%a4%9a%e4%b8%aa%e5%8f%82%e6%95%b0%e4%bc%a0%e9%80%92%e6%97%b6%e7%9a%84%e5%a4%84%e7%90%86","status":"publish","type":"post","link":"https:\/\/blog.qdac.cc\/?p=2254","title":{"rendered":"QWorker \u66f4\u65b0 &#8211; \u7b80\u5316\u591a\u4e2a\u53c2\u6570\u4f20\u9012\u65f6\u7684\u5904\u7406"},"content":{"rendered":"<h4>\u3010\u66f4\u65b0\u5185\u5bb9\u3011<\/h4>\n<p>TQJobExtData \u6269\u5c55\u4e86\u4e00\u4e2a\u65b0\u7684\u6784\u9020\u51fd\u6570\uff0c\u63a5\u53d7\u4e00\u4e2aarray of const \u6570\u7ec4\u6765\u4f20\u9012\u591a\u4e2a\u53c2\u6570\u3002\u9996\u5148\u662f\u6784\u9020\u51fd\u6570\uff1a<\/p>\n<pre class=\"lang:delphi decode:true \">constructor Create(const AParams: array of const); overload;<\/pre>\n<p>\u7136\u540e\u901a\u8fc7\u4e24\u4e2a\u5c5e\u6027\u6765\u8bbf\u95ee\u5176\u4f20\u5165\u7684\u53c2\u6570\uff1a<\/p>\n<ul>\n<li>ParamCount : \u8fd4\u56de\u4f20\u8fdb\u7684\u53c2\u6570\u4e2a\u6570<\/li>\n<li>Params[AIndex:Integer] : \u8fd4\u56de\u7b2c AIndex \u4e2a\u53c2\u6570\u7684\u503c\uff08\u7c7b\u578b\u4e3aVariant\uff09<\/li>\n<\/ul>\n<p>\u7531\u4e8e\u6307\u9488\u7c7b\u578b\u4e0d\u53d7 Variant \u7684\u9ed8\u8ba4\u652f\u6301\uff0c\u6240\u4ee5\u8f6c\u6362\u65f6\u505a\u4e86\u4e00\u4e9b\u5904\u7406\uff0c\u5c06\u5176\u8f6c\u6362\u4e3a32\u4f4d\u6574\u6570\uff0832\u4f4d\u5e73\u53f0\uff09\u621664\u4f4d\u6574\u6570\uff0864\u4f4d\u5e73\u53f0\uff09\uff0c\u5728\u8bbf\u95ee\u65f6\u8bf7\u7279\u522b\u6ce8\u610f\u3002<\/p>\n<p>\u4e0b\u9762\u662f\u4e00\u6bb5\u591a\u53c2\u6570\u8c03\u7528\u7684\u4f8b\u5b50\uff0c\u4f7f\u7528\u4e86\u533f\u540d\u51fd\u6570\u7248\u672c\u7684\u4f5c\u4e1a\uff0c\u4ec5\u4f9b\u53c2\u8003\uff1a<\/p>\n<pre class=\"lang:delphi decode:true\">Workers.Post(\r\n  procedure(AJob: PQJob)\r\n  var\r\n    I:Integer;\r\n    S:String;\r\n  begin\r\n  S:='Name='+AJob.ExtData.Params[0]+#13#10+\r\n    'Age='+IntToStr(AJob.ExtData.Params[1])+#13#10+\r\n    'Type='+AJob.ExtData.Params[2];\r\n  ShowMessage(S);\r\n  end, \r\n  TQJobExtData.Create(['Jody',28,'Boy']),\r\n  true, \r\n  jdfFreeAsObject);<\/pre>\n<p>\u53e6\u5916\u9700\u8981\u6ce8\u610f\u53c2\u6570\u7684\u987a\u5e8f\u548c\u8bbf\u95ee\u65f6\u8981\u4fdd\u8bc1\u4e00\u81f4\uff0c\u5426\u5219\uff0c\u540e\u679c\u4e0d\u662f\u6211\u8981\u8d1f\u8d23\u7684\u3002<\/p>\n<h4>\u3010\u66f4\u65b0\u7ea7\u522b\u3011<\/h4>\n<p>\u53ef\u9009<\/p>\n<h4>\u3010\u7279\u522b\u611f\u8c22\u3011<\/h4>\n<p>\u732b\u53d4\u3001\u8292\u679c<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3010\u66f4\u65b0\u5185\u5bb9\u3011 TQJobExtData  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[69,8,9,6,2],"tags":[],"class_list":["post-2254","post","type-post","status-publish","format-standard","hentry","category-c-builder","category-delphi","category-qdac","category-qworker","category-update"],"views":2746,"_links":{"self":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/2254","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2254"}],"version-history":[{"count":2,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/2254\/revisions"}],"predecessor-version":[{"id":2256,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/2254\/revisions\/2256"}],"wp:attachment":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2254"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2254"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2254"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}