reentrancy Questions
3
I would like to improve my understanding of the word reentrant.
Is this function reentrant?
function* foo() {
yield 1;
yield 2;
}
And this one?
function foo() {
return 1;
}
And this one?
...
Dabble asked 7/12, 2015 at 9:13
9
Solved
In C I know about the recursive function but I heard about the re-entrant function.What is that? And whats the difference between them?
Hanky asked 4/11, 2008 at 9:17
1
I want to cancel an async function on reentrancy, so that the work do not get stacked up and unneeded work is prevented.
e.g. my file scanning can take up to 8 seconds, but when I change the folder...
Mainstream asked 25/2, 2021 at 16:36
8
Solved
Most of the times, the definition of reentrance is quoted from Wikipedia:
A computer program or routine is
described as reentrant if it can be
safely called again before its
previous invocation ha...
Debouchment asked 9/5, 2010 at 20:14
2
Code:
# callee.py
import signal
import sys
import time
def int_handler(*args):
for i in range(10):
print('INTERRUPT', args)
sys.exit()
if __name__ == '__main__':
signal.signal(signal.SIGI...
Flavour asked 14/8, 2017 at 18:3
6
Solved
Reentrancy means that locks are acquired on a per-thread rather than per-invocation basis.
Since an intrinsic lock is held by a thread, doesn't it mean that a thread run once equals an invocation ...
Brigettebrigg asked 12/5, 2013 at 4:34
3
Solved
From the docs:
threading.RLock() --
A factory function that returns a new reentrant lock object. A reentrant lock must be released by the thread that acquired it. Once a thread has acquired a r...
Feline asked 5/4, 2014 at 19:34
1
Solved
This is my first project in libGDX and I am trying to loop a com.badlogic.gdx.utils.Array:
//properties
...
private Array<Item> items;
...
//constructor
...
items = new Array<Item>();
...
Buseck asked 8/5, 2018 at 15:33
1
Solved
I have read the docs for SemaphoreSlim SemaphoreSlim MSDN
which indicates that the SemaphoreSlim will limit a section of code to be run by only 1 thread at a time if you configure it as:
Semaphore...
Thallic asked 5/12, 2016 at 23:25
2
Solved
I'm learning how to use reentrant Bison and Flex together. I already got a simple calculator working without the reentrant capability. However when I activated the reentrant feature and made the ne...
Berate asked 12/9, 2015 at 4:14
9
At the moment, I have some functions which look like this:
private bool inFunction1 = false;
public void function1()
{
if (inFunction1) return;
inFunction1 = true;
// do stuff which might caus...
Iatry asked 24/11, 2008 at 11:22
3
Solved
Recently, I asked a question, with title as "Is malloc thread safe?", and inside that I asked, "Is malloc re-entrant?"
I was under the impression that all re-entrant are thread-safe.
Is this assu...
Abernon asked 13/5, 2009 at 8:43
1
Solved
I am working on a Linux app, which needs to be able to handle large bursts of signals. Although the signal handlers will run fast (I plan at most some thousands of cpu cycles), the signals wi...
Phaeton asked 2/9, 2015 at 9:21
4
Solved
I am reading a book called Linux System Programming. Quoting from this book:
What about system calls and other library functions? What if your
process is in the middle of writing to a file or a...
Ancillary asked 5/6, 2015 at 6:21
2
Solved
Here is some sample code for reentrant locking from 'Java concurrency in practice':
class Widget {
public synchronized void doSomething() {
System.out.println(toString() + ": calling superclass d...
Videogenic asked 12/1, 2015 at 10:53
6
Solved
In UNIX systems we know malloc() is a non-reentrant function (system call). Why is that?
Similarly, printf() also is said to be non-reentrant; why?
I know the definition of re-entrancy, but I wa...
Impatiens asked 15/10, 2010 at 10:12
4
Solved
I was going through a re-entrancy guide on recommended practices when writing re-entrant code.
What other references and resources cover this topic?
What lint-like tools can be used to check for ...
Quinte asked 13/7, 2010 at 18:30
5
Solved
I'm working on a project that's heavily multi-threaded, and was wondering if there's a way to have the compiler flag the use of non-reentrant calls to the C library (e.g. strtok intsead of strtok_r...
Wirewove asked 24/6, 2011 at 1:25
5
Solved
I have a System.Threading.Timer that calls its appropriate event handler (callback) every 10 ms. The method itself is not reentrant and can sometimes take way longer than 10 ms. Thus, I want to sto...
Jevons asked 9/11, 2009 at 7:15
2
Solved
I have a tree structure of arbitrary depth that I want to display with Handlebars. I don't see any way to recurse. If I knew the depth, I could hard code it I suppose, but it can be arbitrarily dee...
Gainer asked 3/10, 2013 at 22:26
1
The Qt documentation states this about thread-safety and reentrancy:
Note: Qt classes are only documented as thread-safe if they are intended to be used by multiple threads. If a function is not...
Courtenay asked 20/3, 2014 at 13:52
2
Solved
Here's a snippet of code that IBM says is reentrant:
/* reentrant function (a better solution) */
char *strtoupper_r(char *in_str, char *out_str)
{
int index;
for (index = 0; in_str[index]; ind...
Tallyman asked 4/4, 2014 at 6:11
2
I have some Java code that is calling some native code, originally written in Fortran, using JNA. (It's a numerical library, and lots of math people do their coding in Fortran.) It is compiled to a...
Garfieldgarfinkel asked 28/1, 2013 at 0:41
2
Solved
I'm using a static variable inside an interrupt handler, making the interrupt handler non-reentrant.
Is it OK to have a non-reentrant interrupt handler?
When a hardware interrupt is raised, doe...
Maurine asked 8/8, 2013 at 17:44
1
Solved
I heard that in C, main() is reentrant, while in C++ is not.
Is this true? What is the scenario of re-entering the main() function?
Par asked 27/6, 2013 at 2:59
1 Next >
© 2022 - 2024 — McMap. All rights reserved.