Simplify the `_child.py` script
We don't really need stdin for anything but passing the entry point and detaching it seemed to just cause errors on cancellation teardown.drop_cloudpickle
							parent
							
								
									aa620fe61d
								
							
						
					
					
						commit
						efde3a5773
					
				| 
						 | 
				
			
			@ -3,11 +3,4 @@ import trio
 | 
			
		|||
import cloudpickle
 | 
			
		||||
 | 
			
		||||
if __name__ == "__main__":
 | 
			
		||||
    job = cloudpickle.load(sys.stdin.detach())
 | 
			
		||||
 | 
			
		||||
    try:
 | 
			
		||||
        result = trio.run(job)
 | 
			
		||||
        cloudpickle.dump(sys.stdout.detach(), result)
 | 
			
		||||
 | 
			
		||||
    except BaseException as err:
 | 
			
		||||
        cloudpickle.dump(sys.stdout.detach(), err)
 | 
			
		||||
    trio.run(cloudpickle.load(sys.stdin.buffer))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue