I don't know of any standard method that gives you the type that an array stores, unless you go and create one yourself as above.
You could finagle something with a macro and typeof, which might also be reasonable if you are repeating the above pattern A LOT, but it also won't be particularly pretty in implementation).
done = Channel(Nil).new spawn do call_next(context) ensure done.send nil end select when done.receive # print content when timeout(34.seconds) # how to print stack trace to investigate which code causes long processing raise "Server could not process_request in 34 seconds" end
call_next(context)is more or less like your Athena's Controller
outa better choice?