A system and method for supporting universal timeout in a distributed computing environment. The universal timeout feature can enforce a defined timeout for a block (or group of blocks) or code executing on a thread regardless of the number of network hops required to effectuate the code. The universal timeout feature allows a thread to express a timeout which is respected across the platform thereby improving timeout functionality compared to prior timeout implementations which pass a timeout between functions. Universal timeout may be implemented using a try-with-resources paradigm where the timeout period is treated as a resource.