Add field-first subproca `.info()` to `._entry`
							parent
							
								
									9bc6a61c93
								
							
						
					
					
						commit
						4f69af872c
					
				| 
						 | 
					@ -106,25 +106,25 @@ def _trio_main(
 | 
				
			||||||
    Entry point for a `trio_run_in_process` subactor.
 | 
					    Entry point for a `trio_run_in_process` subactor.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    '''
 | 
					    '''
 | 
				
			||||||
    log.info(f"Started new trio process for {actor.uid}")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if actor.loglevel is not None:
 | 
					 | 
				
			||||||
        log.info(
 | 
					 | 
				
			||||||
            f"Setting loglevel for {actor.uid} to {actor.loglevel}")
 | 
					 | 
				
			||||||
        get_console_log(actor.loglevel)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    log.info(
 | 
					 | 
				
			||||||
        f"Started {actor.uid}")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    _state._current_actor = actor
 | 
					    _state._current_actor = actor
 | 
				
			||||||
 | 
					 | 
				
			||||||
    log.debug(f"parent_addr is {parent_addr}")
 | 
					 | 
				
			||||||
    trio_main = partial(
 | 
					    trio_main = partial(
 | 
				
			||||||
        async_main,
 | 
					        async_main,
 | 
				
			||||||
        actor,
 | 
					        actor,
 | 
				
			||||||
        parent_addr=parent_addr
 | 
					        parent_addr=parent_addr
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if actor.loglevel is not None:
 | 
				
			||||||
 | 
					        get_console_log(actor.loglevel)
 | 
				
			||||||
 | 
					        import os
 | 
				
			||||||
 | 
					        log.info(
 | 
				
			||||||
 | 
					            'Started new trio process:\n'
 | 
				
			||||||
 | 
					            f'|_{actor}\n'
 | 
				
			||||||
 | 
					            f'  uid: {actor.uid}\n'
 | 
				
			||||||
 | 
					            f'  pid: {os.getpid()}\n'
 | 
				
			||||||
 | 
					            f'  parent_addr: {parent_addr}\n'
 | 
				
			||||||
 | 
					            f'  loglevel: {actor.loglevel}\n'
 | 
				
			||||||
 | 
					        )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    try:
 | 
					    try:
 | 
				
			||||||
        if infect_asyncio:
 | 
					        if infect_asyncio:
 | 
				
			||||||
            actor._infected_aio = True
 | 
					            actor._infected_aio = True
 | 
				
			||||||
| 
						 | 
					@ -133,7 +133,7 @@ def _trio_main(
 | 
				
			||||||
            trio.run(trio_main)
 | 
					            trio.run(trio_main)
 | 
				
			||||||
    except KeyboardInterrupt:
 | 
					    except KeyboardInterrupt:
 | 
				
			||||||
        log.cancel(
 | 
					        log.cancel(
 | 
				
			||||||
            f'Actor@{actor.uid} received KBI'
 | 
					            f'@{actor.uid} received KBI'
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    finally:
 | 
					    finally:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue