Task.h 446 B

123456789101112131415161718192021
  1. /*
  2. * Copyright (c) 2022, Linus Groh <linusg@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <AK/Variant.h>
  8. #include <LibJS/Forward.h>
  9. #include <LibJS/Heap/GCPtr.h>
  10. #include <LibJS/SafeFunction.h>
  11. namespace Web::Fetch::Infrastructure {
  12. // FIXME: 'or a parallel queue'
  13. using TaskDestination = Variant<Empty, JS::NonnullGCPtr<JS::Object>>;
  14. void queue_fetch_task(JS::Object&, JS::SafeFunction<void()>);
  15. }