[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    Re: RFR: 8270269: Desktop.browse method fails if earlier CoInitialize call as COINIT_MULTITHREADED [
From:       Alexey Ivanov <aivanov () openjdk ! org>
Date:       2023-12-11 21:04:33
Message-ID: MiWPgS1148AXy7kWNom-9Jy3ern14Z6lXLmASkAgYYM=.18e50f11-6a14-41cb-abaa-90523f65cf80 () github ! com
[Download RAW message or body]

On Mon, 11 Dec 2023 20:38:46 GMT, Sergey Bylokhov <serb@openjdk.org> wrote:

> A previous call to \
> [CoInitializeEx](https://learn.microsoft.com/en-us/windows/desktop/api/combaseapi/nf-combaseapi-coinitializeex) \
> specified the concurrency model for this thread as multithread apartment (MTA). \
> This could also indicate that a change from neutral-threaded apartment to \
> single-threaded apartment has occurred.

It's confusing, and [Neutral \
Apartments](https://learn.microsoft.com/en-us/windows/win32/cossdk/neutral-apartments) \
does not clarify anything. [The Apartment and the COM Threading \
Architecture](https://learn.microsoft.com/en-us/windows/win32/com/processes--threads--and-apartments#the-apartment-and-the-com-threading-architecture) \
section in "Processes, Threads, and Apartments" article doesn't mention *neutral* at \
all.

At the same time, I am sure the transition from STA to MTA or from MTA to STA is not \
possible.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/17010#issuecomment-1850881527


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic