mutex ?

28 views
Skip to first unread message

M Kelly

unread,
Aug 20, 2019, 11:55:40 PM8/20/19
to vim_use
Hi,

Is there any suggestion for a mutex lock/unlock in vim ?
I want to protect some logging code in my plugin from being executed concurrently.

thx always for everything vim,
-m

Dominique Pellé

unread,
Aug 21, 2019, 12:25:25 AM8/21/19
to Vim List
Vim is single threaded, so there should be no need
for mutexes.

Dominique

M Kelly

unread,
Aug 21, 2019, 12:47:32 AM8/21/19
to vim_use
Hi,

I use job channels and things run async as far as I can tell ?

-m

Ruben Safir

unread,
Aug 21, 2019, 12:48:32 AM8/21/19
to vim...@googlegroups.com
flock


--
So many immigrant groups have swept through our town
that Brooklyn, like Atlantis, reaches mythological
proportions in the mind of the world - RI Safir 1998
http://www.mrbrklyn.com

DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002
http://www.nylxs.com - Leadership Development in Free Software
http://www2.mrbrklyn.com/resources - Unpublished Archive
http://www.coinhangout.com - coins!
http://www.brooklyn-living.com

Being so tracked is for FARM ANIMALS and and extermination camps,
but incompatible with living as a free human being. -RI Safir 2013

Bram Moolenaar

unread,
Aug 21, 2019, 6:55:23 AM8/21/19
to vim...@googlegroups.com, M Kelly

> I use job channels and things run async as far as I can tell ?

Yes, things happen asynchronously, bit all in the same thread.
Thus you can use a normal variable as a flag.

--
From "know your smileys":
:-D Big smile

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

M Kelly

unread,
Aug 21, 2019, 2:26:59 PM8/21/19
to vim_use
Hi,

> Yes, things happen asynchronously, bit all in the same thread.
> Thus you can use a normal variable as a flag.

ok, cool.

-m

Reply all
Reply to author
Forward
0 new messages