April White:

> - made the internal global flag isBuilt a buffer flag; if two files
>   are open that use the go.needs setting, each maintains its own
>   built status

   Good.

> - the buffer flags isDirty and useMonoFont has been encapsulated within
>   a buffer variable and controlled by enum flags

   Grouping all these into a bit set makes it too easy to incorrectly
set multiple states. For me, you use bitsets when there is strong
cohesion between the states so if it often makes sense to treat them
as one thing. Moving useMonoFont and isDirty into this set modifes
code outside the scope of the job queue feature, making it harder to
review. Code that uses bitsets is also longer with extra boolean
operators.

   The biggest problem I have with this version is that ProcessExecute
which is in the execute thread is now modifying the current buffer
directly to set its isBuilt flag. This may not even be the same file
as was being compiled if the user has switched (or closed) buffers.
This needs to be done in the UI thread when it receives
IDM_FINISHEDEXECUTE and to do it correctly, it should receive the
filename being built (incorporate this into the jobQueue) and it
should then look up the right buffer to set built. If the buffer was
closed then there is nothing to set.

   Possibly move the completed job to a finished member of the
jobQueue that can then be queried for information on how the job went
and what its details are.

> I've added a 'Peek' method to the job queue class so that private
> methods can see what is in the queue.  Maybe I'll make this a public
> class so that SciTEBase::Execute(), which is outside of the execute
> thread, can assign dirNameForExecute and dirNameAtExecute in a safer manner.

   I dont like exposing an internal dynamic allocations from the
jobQueue. More specific encapsulated queries may be safer.

   Neil

_______________________________________________
Scite-interest mailing list
Scite-interest@lyra.org
http://mailman.lyra.org/mailman/listinfo/scite-interest

Reply via email to