[Csnd-dev] csGblMtx.h - necessary?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Csnd-dev] csGblMtx.h - necessary?

Steven Yi
Hi All,

I'm looking through the pthreads stuff and I came across H/csGblMtx.h.
I'm wondering: do we need it?  It seems like it's not very good
practice to have a global mutex. From initial looking through it seems
like it's not used too much and the cases that I've found it seems
better to use a per-CSOUND mutex instead.

One of the reasons I'm asking is that csGblMtx.h is currently defined
as a set of macros that use pthread calls. I went through and removed
#includes of csGblMtx.h from a few files that didn't really use
anything from it.  Rather than try to restore Window thread API-based
definitions for csGblMtx.h, I am thinking it would be easier and
better to remove the header and its use altogether.

Thoughts?

steven
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd-dev] csGblMtx.h - necessary?

Michael Gogins-2
Do it. I thought about doing it myself.

Best,
Mike

On Feb 25, 2017 4:32 PM, "Steven Yi" <[hidden email]> wrote:
Hi All,

I'm looking through the pthreads stuff and I came across H/csGblMtx.h.
I'm wondering: do we need it?  It seems like it's not very good
practice to have a global mutex. From initial looking through it seems
like it's not used too much and the cases that I've found it seems
better to use a per-CSOUND mutex instead.

One of the reasons I'm asking is that csGblMtx.h is currently defined
as a set of macros that use pthread calls. I went through and removed
#includes of csGblMtx.h from a few files that didn't really use
anything from it.  Rather than try to restore Window thread API-based
definitions for csGblMtx.h, I am thinking it would be easier and
better to remove the header and its use altogether.

Thoughts?

steven
Loading...