lock-threads | GitHub Action that locks closed issues | Continous Integration library
kandi X-RAY | lock-threads Summary
kandi X-RAY | lock-threads Summary
Lock Threads is a GitHub Action that locks closed issues and pull requests after a period of inactivity.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of lock-threads
lock-threads Key Features
lock-threads Examples and Code Snippets
Community Discussions
Trending Discussions on lock-threads
QUESTION
I understand the purpose of mutex in pthreads, but I often here that it is considered a bad practice to use mutex with a global variable as a shared resource (for example, like in the answer to this question: Mutex lock threads).
So, the questions:
- Is it really that bad to put the shared resource as a global variable?
- If you have only 1 shared variable, like in the example, would it be considered ok to use a global variable, or still no?
- What is the better way to share the variables between the processes?
ANSWER
Answered 2017-Dec-06 at 17:01In general:
Global Variable are Evil:
Yes, you have to create a variable in the main thread and pass the reference to other threads that have to use it, which is true even if you have only one shared variable.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install lock-threads
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page