import acl
# ......
# Create an event.
event, ret = acl.rt.create_event()
# Create a stream.
stream, ret = acl.rt.create_stream()
# Append an event to a stream.
ret = acl.rt.record_event(event, stream)
# Block the application execution and wait until the event is complete, that is, the completion of the stream.
# The stream completion event wakes up the control flow, starting the application execution.
ret = acl.rt.synchronize_event(event)
# Explicitly destroy resources.
ret = acl.rt.destroy_stream(stream)
ret = acl.rt.destroy_event(event)
# ......