rust: proc() syntax obsolete, thread not in prelude
This commit is contained in:
parent
16211fe728
commit
928eb95c72
@ -161,8 +161,12 @@ snippet ss "static string declaration"
|
|||||||
snippet stat "static item declaration"
|
snippet stat "static item declaration"
|
||||||
static ${1}: ${2:usize} = ${0};
|
static ${1}: ${2:usize} = ${0};
|
||||||
# Concurrency
|
# Concurrency
|
||||||
snippet spawn "spawn a task or thread"
|
snippet scoped "spawn a scoped thread"
|
||||||
spawn(proc() {
|
thread::scoped(${1:move }|| {
|
||||||
|
${0}
|
||||||
|
});
|
||||||
|
snippet spawn "spawn a thread"
|
||||||
|
thread::spawn(${1:move }|| {
|
||||||
${0}
|
${0}
|
||||||
});
|
});
|
||||||
snippet chan "Declare (Sender, Receiver) pair of asynchronous channel()"
|
snippet chan "Declare (Sender, Receiver) pair of asynchronous channel()"
|
||||||
|
Loading…
Reference in New Issue
Block a user