mirror of
https://github.com/vlang/v.git
synced 2025-09-14 15:02:33 +03:00
all: experimental locked concurrency support, part 1 (#5637)
This commit is contained in:
parent
27149ba8bc
commit
3b067f5f85
27 changed files with 510 additions and 51 deletions
|
@ -28,7 +28,7 @@ pub mut:
|
|||
}
|
||||
|
||||
pub fn (mut mh TestMessageHandler) append_message(msg string) {
|
||||
mh.mtx.lock()
|
||||
mh.mtx.m_lock()
|
||||
mh.messages << msg
|
||||
mh.mtx.unlock()
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ pub fn (mut ts TestSession) test() {
|
|||
}
|
||||
|
||||
pub fn (mut m TestMessageHandler) display_message() {
|
||||
m.mtx.lock()
|
||||
m.mtx.m_lock()
|
||||
defer {
|
||||
m.messages.clear()
|
||||
m.mtx.unlock()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue