Added spawnRef and spawnLinkedRef for passing by reference through spawn#7167
Added spawnRef and spawnLinkedRef for passing by reference through spawn#7167ghost wants to merge 1 commit intodlang:masterfrom
Conversation
1b6d33b to
ff1ad47
Compare
It is often useful to pass a mutable by reference type to the spawned thread, the need to have to use a raw pointer before this patch made the syntax boring and not in line with the rest of the DLang style (use pointer as little as possible). Signed-off-by: Ernesto Castellotti <erny.castell@gmail.com>
|
As mentioned in the other PR, I'm not sure of this at all. |
|
I don't know, everyone does not like the previous PR and currently does not pass all the tests yet |
I'd been previously miffed by not being able to use spawn with ref functions, so I like the premise of it. A separate function that uses |
|
@ErnyTech @atilaneves How should we move forward here? Should we close this? |
|
Is there a reason why it has to have a different name? |
|
Sorry but currently I can no longer take care of this, I think it is better to close this. If someone else intends to continue they can open a new PR |
|
Filed: https://issues.dlang.org/show_bug.cgi?id=21848 Closing. |
It is often useful to pass a mutable by reference type to the spawned
thread, the need to have to use a raw pointer before this patch made
the syntax boring and not in line with the rest of the DLang style
(use pointer as little as possible).
With this patch it will be possible to write code like this:
Instead of the boring:
This PR is an alternative of #7124