<p>The <code>endpoint</code> is a <code>Promise</code> - which is asynchronous. When called multiple times with different <code>ContractInstance</code>, it works without any conflicts.</p>
<p>What happens when an <code>endpoint</code> is called twice by the same <code>ContractInstanceId</code> can be found <a href="https://cardano.stackexchange.com/questions/4026/hooks-empty-after-calling-endpoint">here</a></p>

CC BY-SA 4.0
2022-02-10T03:35:21.893Z
2022-02-10T03:35:21.893Z
Aoaddeola
<p>The off-chain contract code is recursive, holds and waits until endpoint is called, then executes code (gets busy for a little while), then recurses.</p>
<p>What happens when a endpoint is called while the contract code is &quot;busy&quot; handling another previous call, hence it is not listening.</p>

<plutus-pioneer-program>
ppp Class 4: What happens when a contract is called while it is not waiting?
# ppp Class 4: What happens when a contract is called while it is not waiting?

(Asked by: username_0 on 2022-02-08)

The off-chain contract code is recursive, holds and waits until endpoint is called, then executes code (gets busy for a little while), then recurses.

What happens when a endpoint is called while the contract code is "busy" handling another previous call, hence it is not listening.

**Tags:** plutus-pioneer-program

---

## 1 answers

### Answer by username_1 on 2022-02-10. Score: 2 | Accepted answer

The `endpoint` is a `Promise` - which is asynchronous. When called multiple times with different `ContractInstance`, it works without any conflicts.

What happens when an `endpoint` is called twice by the same `ContractInstanceId` can be found [here](https://cardano.stackexchange.com/questions/4026/hooks-empty-after-calling-endpoint)


---

