Skip to content

Segmentation fault when used in the thread #128

@goodm2ice

Description

@goodm2ice

When trying to call a context in a thread, scripts always crash. Tested on linux. Sample code and its output below:

import STPyV8
from threading import Thread

def test():
    print('Before context')
    with STPyV8.JSContext() as ctxt:
        print('In context')
    print('After context')

class Test(Thread):
    def run(self):
        test()

print('DIRECT')
test()
print('THREAD')
t = Test()
t.start()
DIRECT
Before context
In context
After context
THREAD
Before context
[1]    473260 segmentation fault (core dumped)  python test5.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions