/* COPYRIGHT Esri - https://js.arcgis.com/5.1.2/LICENSE.txt */
class t{constructor(t){this._gl=t,this._sync=t.fenceSync(t.SYNC_GPU_COMMANDS_COMPLETE,0)}poll(){const t=this._gl,n=t.clientWaitSync(this._sync,t.SYNC_FLUSH_COMMANDS_BIT,0);if(n===t.WAIT_FAILED)throw new Error("clientWaitSync failed");return n!==t.TIMEOUT_EXPIRED}destroy(){this._gl.deleteSync(this._sync),this._sync=null}}export{t as Sync};
