CreateAndStart

24 views
Skip to first unread message

Steve Wagner

unread,
Jun 9, 2009, 8:12:14 AM6/9/09
to retla...@googlegroups.com
Hi, i want to write a patch for Retlang which adds something like the
following.

var fiber = ThreadFiber.CreateAndStart();

because the most time the user wants to have the Fiber startet.

So the question is, do you want something like that and how should it
look like?

Options: (For each constructor overload one method)

1. ThreadFiber.CreateAndStart()
FormFiber.CreateAndStart()

2. ThreadFiberFactory.CreateAndStart()
FormFiberFactory.CreateAndStart()

3. FiberFactory.StartedThreadFiber()
FiberFactory.StartedFormFiber()

Sentences?

Steve

Steve Wagner

unread,
Jun 18, 2009, 7:38:25 PM6/18/09
to retla...@googlegroups.com
What about

var fiber = new ThreadFiber(ExecutionState.Started);

or

var fiber = new ThreadFiber().Start(); // Start could return IFiber

Steve Wagner schrieb:

Mike Rettig

unread,
Jun 18, 2009, 7:46:16 PM6/18/09
to retla...@googlegroups.com
The fiber api is modeled after the thread api.

var t = new Thread();
t.Start();

So to be consistent, I think the current constructor and start methods are sufficient.

Mi

Steve Wagner

unread,
Jun 18, 2009, 8:30:33 PM6/18/09
to retla...@googlegroups.com
Ok, i suggested this because the most time a fiber is directly started
after it was created and it is a good idea to shorten this in one statement.

I have some tiny patches for the Dispatcher fiber. Ive added overlaods
to provide the DispatcherPriority and add overloads which use the
Dispatcher.Current.

-Steve

Mike Rettig schrieb:
Reply all
Reply to author
Forward
0 new messages