Bug 261080 - WorkQueue should inherit from ConcurrentWorkQueue
Summary: WorkQueue should inherit from ConcurrentWorkQueue
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jean-Yves Avenard [:jya]
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-09-03 04:03 PDT by Jean-Yves Avenard [:jya]
Modified: 2023-09-03 04:03 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Yves Avenard [:jya] 2023-09-03 04:03:08 PDT
There are currently multiple issues that needs to be resoved:
- A WorkQueue is a ConcurrentWorkQueue
- A ConcurrentWorkQueue may be a serial workqueue
- A WorkQueue must be a SerialFunctionDispatcher to be able to use it
  interchangeably with other thread-like object (like a RunLoop or a WorkerThread)
- IOCache class can use either a WorkQueue or a ConcurrentWorkQueue and as
  such they have to be related, currently it is using the WorkQueueBase class which is a bad thing. (WorkQueueBase should be a private inheritance)

It is essential that we can distinguish a serial WorkQueue from a concurrent one.

One issue is that the class name ConcurrentWorkQueue seems to indicate that it is only a concurrent queue
(even though it may behave just like a serial WorkQueue (and this is the default implementation on non cocoa platform). 
A rename to something more helpful would be useful. Maybe `WorkDispatcher` ?

We handle the WorkQueue inheriting from a SerialFunctionDispatch in bug 260779.

While this code change should be straightforward, there are linkage issues due to WebKit only exporting some symbols from a class and this is conflicting with the vtables used for the multiple inheritance.
Comment 1 Radar WebKit Bug Importer 2023-09-03 04:03:28 PDT
<rdar://problem/114894859>