Pythomnic is oriented to synchronous processing of incoming requests. This is true even for the asynchronous message-oriented interfaces, in both cases the accepted request is assigned time to complete. The request deadline is inserted by the interface to the request context and is available throughout the application code using the following construct
seconds_to_complete_in = pmnc_time_left()
in appropriate cases the application code may consult this timeout remaining and avoid initiating some time consuming processing:
if pmnc_time_left() < 5.0:
    raise Exception("No way this can complete so fast")
Although this cannot prevent the runaway code, such as
while True:
    pass
as the platform cannot terminate the above infinite loop upon a timeout, nor can it interrupt code execution at an arbitrary moment in time, but there are points where such interruption is possible.
First, an attempt to execute a synchronous RPC call to a different cage
result = pmnc.execute.on("target_cage").module.method(...)
will not be taken if the request has run out of time. Similarly, the timeout for the RPC call would be lowered as appropriate to match the pmnc_time_left value.
Similarly, a request to any external system
records = pmnc.my_db.execute("SELECT * FROM t")
is also cancelled upon a timeout or has its execution timeout reduced as appropriate.