Method Thread.ResourceCount()->wait_till_drained() Method wait_till_drained final void wait_till_drained(void|int level) Description Blocks until the resource-counter dips to max level. Parameter level The maximum level that is considered drained.