Robotframework logging and threading
Hi, basically this is an question rather than an actual issue, the below piece of code will create an process to run the (robot suite) target function, the default system call to create an process on Unix systems is "fork":
async def run_robot_in_background(func, args):
p = mp.Process(target=func, args=args)
p.start()
return p
What i have noticed is that Starlette is using AnyIO to manage the non-async/blocking code via AnyIO worker threads (robot code is non-async) which seems that it causing issues with robotframework api.logger which requires the code to be executed inside the MainThread. So, in this line of code: https://github.com/MarketSquare/robotframework-webservice/blob/master/RobotFrameworkService/routers/robotframework.py#L84 the subprocess will use the MainThread right (it is awaited in the event loop) and not AnyIO worker thread? Did you notice any issues with the robot.api.logger ?