@@ -139,7 +139,7 @@ <h1 class="title">threadproxy</h1>
139139 defaultAction: ThreadDefaultActionHandler
140140 callbackSeed: int
141141 jsonCallbacks: Table[int, Future[JsonNode]]
142- channelCallbacks: Table[int, Future[ThreadChannelPtr]]
142+ channelCallbacks: Table[int, Future[ThreadChannelPtr]] ## local cache to resolve name to channel
143143 directory: Table[string, ThreadChannelPtr] "> < wbr /> Thread< wbr /> Proxy< span class ="attachedType "> </ span > </ a > </ li >
144144 < li > < a class ="reference " href ="#MainThreadProxy "
145145 title ="MainThreadProxy = ref object of ThreadProxy
@@ -171,8 +171,6 @@ <h1 class="title">threadproxy</h1>
171171 title ="on(proxy: ThreadProxy; action: string; handler: ThreadActionHandler) "> < wbr /> on< span class ="attachedType "> ThreadProxy</ span > </ a > </ li >
172172 < li > < a class ="reference " href ="#onDefault%2CThreadProxy%2CThreadDefaultActionHandler "
173173 title ="onDefault(proxy: ThreadProxy; handler: ThreadDefaultActionHandler) "> < wbr /> on< wbr /> Default< span class ="attachedType "> ThreadProxy</ span > </ a > </ li >
174- < li > < a class ="reference " href ="#getChannel%2CThreadProxy%2Cstring "
175- title ="getChannel(proxy: ThreadProxy; name: string): Future[ThreadChannelPtr] "> < wbr /> get< wbr /> Channel< span class ="attachedType "> ThreadProxy</ span > </ a > </ li >
176174 < li > < a class ="reference " href ="#send%2CThreadProxy%2Cstring%2Cstring%2CJsonNode "
177175 title ="send(proxy: ThreadProxy; target: string; action: string; data: JsonNode = nil): Future[
178176 void] "> < wbr /> send< span class ="attachedType "> ThreadProxy</ span > </ a > </ li >
@@ -231,7 +229,7 @@ <h1><a class="toc-backref" href="#7">Types</a></h1>
231229</ pre > </ dt >
232230< dd >
233231
234- Raised when thread with name cannot be found
232+ Raised when operation on thread with name < tt class =" docutils literal " > < span class =" pre " > threadName </ span > </ tt > cannot be found
235233
236234</ dd >
237235< a id ="ReceiverNotFoundError "> </ a >
@@ -241,7 +239,7 @@ <h1><a class="toc-backref" href="#7">Types</a></h1>
241239</ pre > </ dt >
242240< dd >
243241
244- Raised whenever thread with name not found
242+ Raised whenever sending a message to unknown receiver
245243
246244</ dd >
247245< a id ="MessageUndeliveredError "> </ a >
@@ -263,7 +261,7 @@ <h1><a class="toc-backref" href="#7">Types</a></h1>
263261</ pre > </ dt >
264262< dd >
265263
266- Raised when registering action with non-unique name
264+ Raised when registering action is not unique
267265
268266</ dd >
269267< a id ="NameConflictError "> </ a >
@@ -272,7 +270,7 @@ <h1><a class="toc-backref" href="#7">Types</a></h1>
272270</ pre > </ dt >
273271< dd >
274272
275- Raise when creating thread with non-unique name
273+ Raised when name of thread is not unique
276274
277275</ dd >
278276< a id ="PollConflictError "> </ a >
@@ -281,22 +279,22 @@ <h1><a class="toc-backref" href="#7">Types</a></h1>
281279</ pre > </ dt >
282280< dd >
283281
284- Raise when poll() is called while ThreadProxy is running
282+ Raised when poll() is called while ThreadProxy is running
285283
286284</ dd >
287285< a id ="ThreadActionHandler "> </ a >
288286< dt > < pre > < a href ="threadproxy.html#ThreadActionHandler "> < span class ="Identifier "> ThreadActionHandler</ span > </ a > < span class ="Other "> =</ span > < span class ="Keyword "> proc</ span > < span class ="Other "> (</ span > < span class ="Identifier "> data</ span > < span class ="Other "> :</ span > < span class ="Identifier "> JsonNode</ span > < span class ="Other "> )</ span > < span class ="Other "> :</ span > < span class ="Identifier "> Future</ span > < span class ="Other "> [</ span > < span class ="Identifier "> JsonNode</ span > < span class ="Other "> ]</ span > < span > < span class ="Other "> {</ span > < span class ="Other pragmadots "> ...</ span > < span class ="Other "> }</ span > </ span > < span class ="pragmawrap "> < span class ="Other "> {.</ span > < span class ="pragma "> < span class ="Identifier "> gcsafe</ span > </ span > < span class ="Other "> .}</ span > </ span > </ pre > </ dt >
289287< dd >
290288
291-
289+ Signature for action handler
292290
293291</ dd >
294292< a id ="ThreadDefaultActionHandler "> </ a >
295293< dt > < pre > < a href ="threadproxy.html#ThreadDefaultActionHandler "> < span class ="Identifier "> ThreadDefaultActionHandler</ span > </ a > < span class ="Other "> =</ span > < span class ="Keyword "> proc</ span > < span class ="Other "> (</ span > < span class ="Identifier "> action</ span > < span class ="Other "> :</ span > < span class ="Identifier "> string</ span > < span class ="Other "> ;</ span > < span class ="Identifier "> data</ span > < span class ="Other "> :</ span > < span class ="Identifier "> JsonNode</ span > < span class ="Other "> )</ span > < span class ="Other "> :</ span > < span class ="Identifier "> Future</ span > < span class ="Other "> [</ span > < span class ="Identifier "> JsonNode</ span > < span class ="Other "> ]</ span > < span > < span class ="Other "> {</ span > < span class ="Other pragmadots "> ...</ span > < span class ="Other "> }</ span > </ span > < span class ="pragmawrap "> < span class ="Other "> {.</ span > < span class ="pragma ">
296294 < span class ="Identifier "> gcsafe</ span > </ span > < span class ="Other "> .}</ span > </ span > </ pre > </ dt >
297295< dd >
298296
299-
297+ Signature for default action handler
300298
301299</ dd >
302300< a id ="ThreadProxy "> </ a >
@@ -308,7 +306,7 @@ <h1><a class="toc-backref" href="#7">Types</a></h1>
308306 < span class ="Identifier "> defaultAction</ span > < span class ="Other "> :</ span > < a href ="threadproxy.html#ThreadDefaultActionHandler "> < span class ="Identifier "> ThreadDefaultActionHandler</ span > </ a >
309307 < span class ="Identifier "> callbackSeed</ span > < span class ="Other "> :</ span > < span class ="Identifier "> int</ span >
310308 < span class ="Identifier "> jsonCallbacks</ span > < span class ="Other "> :</ span > < span class ="Identifier "> Table</ span > < span class ="Other "> [</ span > < span class ="Identifier "> int</ span > < span class ="Other "> ,</ span > < span class ="Identifier "> Future</ span > < span class ="Other "> [</ span > < span class ="Identifier "> JsonNode</ span > < span class ="Other "> ]</ span > < span class ="Other "> ]</ span >
311- < span class ="Identifier "> channelCallbacks</ span > < span class ="Other "> :</ span > < span class ="Identifier "> Table</ span > < span class ="Other "> [</ span > < span class ="Identifier "> int</ span > < span class ="Other "> ,</ span > < span class ="Identifier "> Future</ span > < span class ="Other "> [</ span > < span class ="Identifier "> ThreadChannelPtr</ span > < span class ="Other "> ]</ span > < span class ="Other "> ]</ span >
309+ < span class ="Identifier "> channelCallbacks</ span > < span class ="Other "> :</ span > < span class ="Identifier "> Table</ span > < span class ="Other "> [</ span > < span class ="Identifier "> int</ span > < span class ="Other "> ,</ span > < span class ="Identifier "> Future</ span > < span class ="Other "> [</ span > < span class ="Identifier "> ThreadChannelPtr</ span > < span class ="Other "> ]</ span > < span class ="Other "> ]</ span > < span class =" Comment " > ## local cache to resolve name to channel </ span >
312310 < span class ="Identifier "> directory</ span > < span class ="Other "> :</ span > < span class ="Identifier "> Table</ span > < span class ="Other "> [</ span > < span class ="Identifier "> string</ span > < span class ="Other "> ,</ span > < span class ="Identifier "> ThreadChannelPtr</ span > < span class ="Other "> ]</ span >
313311</ pre > </ dt >
314312< dd >
@@ -340,7 +338,7 @@ <h1><a class="toc-backref" href="#7">Types</a></h1>
340338< dt > < pre > < a href ="threadproxy.html#ThreadMainProc "> < span class ="Identifier "> ThreadMainProc</ span > </ a > < span class ="Other "> =</ span > < span class ="Keyword "> proc</ span > < span class ="Other "> (</ span > < span class ="Identifier "> proxy</ span > < span class ="Other "> :</ span > < a href ="threadproxy.html#ThreadProxy "> < span class ="Identifier "> ThreadProxy</ span > </ a > < span class ="Other "> )</ span > < span > < span class ="Other "> {</ span > < span class ="Other pragmadots "> ...</ span > < span class ="Other "> }</ span > </ span > < span class ="pragmawrap "> < span class ="Other "> {.</ span > < span class ="pragma "> < span class ="Identifier "> thread</ span > < span class ="Other "> ,</ span > < span class ="Identifier "> nimcall</ span > </ span > < span class ="Other "> .}</ span > </ span > </ pre > </ dt >
341339< dd >
342340
343-
341+ Signature for entry function of thread
344342
345343</ dd >
346344
@@ -367,15 +365,15 @@ <h1><a class="toc-backref" href="#12">Procs</a></h1>
367365< dt > < pre > < span class ="Keyword "> proc</ span > < a href ="#name%2CThreadProxy "> < span class ="Identifier "> name</ span > </ a > < span class ="Other "> (</ span > < span class ="Identifier "> proxy</ span > < span class ="Other "> :</ span > < a href ="threadproxy.html#ThreadProxy "> < span class ="Identifier "> ThreadProxy</ span > </ a > < span class ="Other "> )</ span > < span class ="Other "> :</ span > < span class ="Identifier "> string</ span > < span > < span class ="Other "> {</ span > < span class ="Other pragmadots "> ...</ span > < span class ="Other "> }</ span > </ span > < span class ="pragmawrap "> < span class ="Other "> {.</ span > < span class ="pragma "> < span class ="Identifier "> inline</ span > < span class ="Other "> ,</ span > < span class ="Identifier "> raises</ span > < span class ="Other "> :</ span > < span class ="Other "> [</ span > < span class ="Other "> ]</ span > < span class ="Other "> ,</ span > < span class ="Identifier "> tags</ span > < span class ="Other "> :</ span > < span class ="Other "> [</ span > < span class ="Other "> ]</ span > </ span > < span class ="Other "> .}</ span > </ span > </ pre > </ dt >
368366< dd >
369367
370-
368+ Get the name of thread
371369
372370</ dd >
373371< a id ="isNameAvailable,MainThreadProxy,string "> </ a >
374372< dt > < pre > < span class ="Keyword "> proc</ span > < a href ="#isNameAvailable%2CMainThreadProxy%2Cstring "> < span class ="Identifier "> isNameAvailable</ span > </ a > < span class ="Other "> (</ span > < span class ="Identifier "> proxy</ span > < span class ="Other "> :</ span > < a href ="threadproxy.html#MainThreadProxy "> < span class ="Identifier "> MainThreadProxy</ span > </ a > < span class ="Other "> ;</ span > < span class ="Identifier "> name</ span > < span class ="Other "> :</ span > < span class ="Identifier "> string</ span > < span class ="Other "> )</ span > < span class ="Other "> :</ span > < span class ="Identifier "> bool</ span > < span > < span class ="Other "> {</ span > < span class ="Other pragmadots "> ...</ span > < span class ="Other "> }</ span > </ span > < span class ="pragmawrap "> < span class ="Other "> {.</ span > < span class ="pragma "> < span class ="Identifier "> inline</ span > < span class ="Other "> ,</ span > < span class ="Identifier "> raises</ span > < span class ="Other "> :</ span > < span class ="Other "> [</ span > < span class ="Other "> ]</ span > < span class ="Other "> ,</ span >
375373 < span class ="Identifier "> tags</ span > < span class ="Other "> :</ span > < span class ="Other "> [</ span > < span class ="Other "> ]</ span > </ span > < span class ="Other "> .}</ span > </ span > </ pre > </ dt >
376374< dd >
377375
378-
376+ Chekc if the name is available to use
379377
380378</ dd >
381379< a id ="isRunning,ThreadProxy "> </ a >
@@ -400,14 +398,6 @@ <h1><a class="toc-backref" href="#12">Procs</a></h1>
400398
401399Set default < tt class ="docutils literal "> < span class ="pre "> handler</ span > </ tt > for all unhandled action
402400
403- </ dd >
404- < a id ="getChannel,ThreadProxy,string "> </ a >
405- < dt > < pre > < span class ="Keyword "> proc</ span > < a href ="#getChannel%2CThreadProxy%2Cstring "> < span class ="Identifier "> getChannel</ span > </ a > < span class ="Other "> (</ span > < span class ="Identifier "> proxy</ span > < span class ="Other "> :</ span > < a href ="threadproxy.html#ThreadProxy "> < span class ="Identifier "> ThreadProxy</ span > </ a > < span class ="Other "> ;</ span > < span class ="Identifier "> name</ span > < span class ="Other "> :</ span > < span class ="Identifier "> string</ span > < span class ="Other "> )</ span > < span class ="Other "> :</ span > < span class ="Identifier "> Future</ span > < span class ="Other "> [</ span > < span class ="Identifier "> ThreadChannelPtr</ span > < span class ="Other "> ]</ span > < span > < span class ="Other "> {</ span > < span class ="Other pragmadots "> ...</ span > < span class ="Other "> }</ span > </ span > < span class ="pragmawrap "> < span class ="Other "> {.</ span > < span class ="pragma ">
406- < span class ="Identifier "> raises</ span > < span class ="Other "> :</ span > < span class ="Other "> [</ span > < span class ="Identifier "> ValueError</ span > < span class ="Other "> ,</ span > < span class ="Identifier "> FutureError</ span > < span class ="Other "> ,</ span > < span class ="Identifier "> Exception</ span > < span class ="Other "> ,</ span > < span class ="Identifier "> DeadThreadError</ span > < span class ="Other "> ]</ span > < span class ="Other "> ,</ span > < span class ="Identifier "> tags</ span > < span class ="Other "> :</ span > < span class ="Other "> [</ span > < span class ="Identifier "> RootEffect</ span > < span class ="Other "> ]</ span > </ span > < span class ="Other "> .}</ span > </ span > </ pre > </ dt >
407- < dd >
408-
409- Resolve name to channel
410-
411401</ dd >
412402< a id ="send,ThreadProxy,string,string,JsonNode "> </ a >
413403< dt > < pre > < span class ="Keyword "> proc</ span > < a href ="#send%2CThreadProxy%2Cstring%2Cstring%2CJsonNode "> < span class ="Identifier "> send</ span > </ a > < span class ="Other "> (</ span > < span class ="Identifier "> proxy</ span > < span class ="Other "> :</ span > < a href ="threadproxy.html#ThreadProxy "> < span class ="Identifier "> ThreadProxy</ span > </ a > < span class ="Other "> ;</ span > < span class ="Identifier "> target</ span > < span class ="Other "> :</ span > < span class ="Identifier "> string</ span > < span class ="Other "> ;</ span > < span class ="Identifier "> action</ span > < span class ="Other "> :</ span > < span class ="Identifier "> string</ span > < span class ="Other "> ;</ span > < span class ="Identifier "> data</ span > < span class ="Other "> :</ span > < span class ="Identifier "> JsonNode</ span > < span class ="Other "> =</ span > < span class ="Keyword "> nil</ span > < span class ="Other "> )</ span > < span class ="Other "> :</ span > < span class ="Identifier "> Future</ span > < span class ="Other "> [</ span >
@@ -441,7 +431,7 @@ <h1><a class="toc-backref" href="#12">Procs</a></h1>
441431< dt > < pre > < span class ="Keyword "> proc</ span > < a href ="#stop%2CThreadProxy "> < span class ="Identifier "> stop</ span > </ a > < span class ="Other "> (</ span > < span class ="Identifier "> proxy</ span > < span class ="Other "> :</ span > < a href ="threadproxy.html#ThreadProxy "> < span class ="Identifier "> ThreadProxy</ span > </ a > < span class ="Other "> )</ span > < span > < span class ="Other "> {</ span > < span class ="Other pragmadots "> ...</ span > < span class ="Other "> }</ span > </ span > < span class ="pragmawrap "> < span class ="Other "> {.</ span > < span class ="pragma "> < span class ="Identifier "> inline</ span > < span class ="Other "> ,</ span > < span class ="Identifier "> raises</ span > < span class ="Other "> :</ span > < span class ="Other "> [</ span > < span class ="Other "> ]</ span > < span class ="Other "> ,</ span > < span class ="Identifier "> tags</ span > < span class ="Other "> :</ span > < span class ="Other "> [</ span > < span class ="Other "> ]</ span > </ span > < span class ="Other "> .}</ span > </ span > </ pre > </ dt >
442432< dd >
443433
444-
434+ Stop processing messages. The future returned from < tt class =" docutils literal " > < span class =" pre " > poll() </ span > </ tt > will complete.
445435
446436</ dd >
447437< a id ="poll,ThreadProxy,int "> </ a >
@@ -516,7 +506,7 @@ <h1><a class="toc-backref" href="#18">Templates</a></h1>
516506 < div class ="twelve-columns footer ">
517507 < span class ="nim-sprite "> </ span >
518508 < br />
519- < small style ="color: var(--hint); "> Made with Nim. Generated: 2020-05-28 18:38:52 UTC</ small >
509+ < small style ="color: var(--hint); "> Made with Nim. Generated: 2020-05-28 18:57:02 UTC</ small >
520510 </ div >
521511 </ div >
522512 </ div >
0 commit comments