Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign

UI thread to build the symbol tree

<< < (2/2)

Loaden:

--- Quote from: jens on August 28, 2011, 11:06:00 am ---
--- Quote from: Loaden on August 28, 2011, 10:59:48 am ---Can we build the symbols tree on MAIN Thread?
Any comments?

--- End quote ---
Building the symbols-tree can take several seconds and would block the main-thread every time it is rebuild.

--- End quote ---
But now there is a multi-thread-safety issues!
If we delete a Parser, but the symbol tree is still in the build process?

I can't find a better way for solved this issue.

oBFusCATed:
You can use shared_ptr to prevent the deletion.

Jenna:

--- Quote from: oBFusCATed on August 28, 2011, 11:19:35 am ---You can use shared_ptr to prevent the deletion.

--- End quote ---
and additional a flag, that marks the parser as invalid, so the symbolsbrowser buildthread (or possibly others that use the parser) stop using it.

Loaden:

--- Quote from: jens on August 28, 2011, 12:01:19 pm ---
--- Quote from: oBFusCATed on August 28, 2011, 11:19:35 am ---You can use shared_ptr to prevent the deletion.

--- End quote ---
and additional a flag, that marks the parser as invalid, so the symbolsbrowser buildthread (or possibly others that use the parser) stop using it.

--- End quote ---
This is a lot of trouble! Seems to be slowly improved.
If more developers can focus CC plug-in, will be very lucky! :lol:

Navigation

[0] Message Index

[*] Previous page

Go to full version