Skip to content

Commit 37f7455

Browse files
committed
in _gettid use the one ctx.mainthread id for all ctx threads
1 parent 7ad2940 commit 37f7455

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/MultiprocessingModuleBuiltins.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,8 @@ long spawn(VirtualFrame frame, int fd, int sentinel, PList keepFds,
210210
abstract static class GetTidNode extends PythonBuiltinNode {
211211
@Specialization
212212
@TruffleBoundary
213-
static long getTid() {
214-
return convertTid(Thread.currentThread().getId());
213+
long getTid() {
214+
return convertTid(getContext().getMainThread().getId());
215215
}
216216
}
217217

0 commit comments

Comments
 (0)