Dne 6.10.2014 v 12:15 ketmar via Digitalmars-d napsal(a): > On Mon, 06 Oct 2014 10:22:01 +0200 > Martin Drašar via Digitalmars-d <digitalmars-d@puremagic.com> wrote: > > as i said this is the very first version of cmdcon, not the one i'm > using now. i'm not able to publish the current version yet. > >> That is, how do you use this console interactively? >> In your previous mail you wrote that you use a telnet. >> Do you have another mixin that at some specific point inserts a code >> that pauses the execution of surrounding code and starts listening >> for telnet commands? > it depends of event loop, actually. i have my own event loop code, and > there is hook for telnet channel. that hook collects line to execute, > calls cmdcon executor and outputs cmdcon output. maybe i'll publish > some std.socket-based sample later. > >> Also, how do you make your console work in multithreaded programs? > you should register only shared and global vars (and i'm really missing > __trait(isGShared) here!), there is no sense to register thread locals > in multithreaded program. > > but you can register free functions and execute 'em. that free > functions should take care of threading. > > really, i have to revisit that code and write some samples. i'll try to > do that soon. and maybe i'll update public versino of cmdcon a little > too. ;-) >
Ok, thanks for your answers. If you get your code to publishable state, I am sure a lot of people will be interested. Cheers, Martin
smime.p7s
Description: Elektronicky podpis S/MIME