process.js 772 B

123456789101112131415161718
  1. import { hasActiveObservations } from '../algorithms/hasActiveObservations';
  2. import { hasSkippedObservations } from '../algorithms/hasSkippedObservations';
  3. import { deliverResizeLoopError } from '../algorithms/deliverResizeLoopError';
  4. import { broadcastActiveObservations } from '../algorithms/broadcastActiveObservations';
  5. import { gatherActiveObservationsAtDepth } from '../algorithms/gatherActiveObservationsAtDepth';
  6. var process = function () {
  7. var depth = 0;
  8. gatherActiveObservationsAtDepth(depth);
  9. while (hasActiveObservations()) {
  10. depth = broadcastActiveObservations();
  11. gatherActiveObservationsAtDepth(depth);
  12. }
  13. if (hasSkippedObservations()) {
  14. deliverResizeLoopError();
  15. }
  16. return depth > 0;
  17. };
  18. export { process };