Appending Text to SWT Textbox from multiple threads.

Sharad Gupta gsharad007 at yahoo.com
Tue Mar 18 07:14:06 PDT 2014


On Tuesday, 18 March 2014 at 07:20:05 UTC, Jacob Carlborg wrote:
> On Tuesday, 18 March 2014 at 07:19:05 UTC, Jacob Carlborg wrote:
>
>> What exact problems do you have?
>>
>> Note that SWT is not thread safe. All UI changes need to be 
>> made on the UI thread. This is usually done using the 
>> "Display.asyncExec" method.
>
> Forgot the link to the example:
> http://git.eclipse.org/c/platform/eclipse.platform.swt.git/tree/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet56.java
>
> --
> /Jacob Carlborg

Yeah I have seen that but haven't tried it on the account that 
I'll have the same problem as before where I cannot pass Display 
to the spawned Process.

I think if I used core.Thread I would be able to do this easily 
but I wanted to first investigate a possible solution with 
std.concurrency.spawn and its additional checks.

Maybe D needs a way to mark an object as Thread-Local and bypass 
some of these checks.


More information about the Digitalmars-d-learn mailing list