class_docstr: Cached property with waiting for event.
class_docstr_tok: ["Cached","property","with","waiting","for","event","."]
code: def __init__(self, event):
      self._cost = 1
      self.lock = threading.RLock()
      self.event = event
  
imports: import concurrent.futures
  import sys
  import threading
  import pytest
  from flash.core.serve._compat.cached_property import cached_property
  from flash.core.utilities.imports import _TOPIC_SERVE_AVAILABLE
label_desc: Use image node_id 1 to create a new CachedCostItemWait object  with example: obj = CachedCostItemWait(event)