Skip to content

Commit

Permalink
Avoid calling values() on a shared object
Browse files Browse the repository at this point in the history
* This fixes a compilation on dmd v2.087.0+ ( I think? )
  /usr/include/dmd/druntime/import/object.d(3453,36): Error: cannot implicitly convert expression aa of type shared(ProcessStatus[int]) to const(shared(ProcessStatus)[int])
  source/gx/tilix/terminal/monitor.d(46,46): Error: template instance `object.values!(shared(ProcessStatus[int]), shared(ProcessStatus), int)` error instantiating
  • Loading branch information
luk1337 committed Jul 15, 2019
1 parent 3617018 commit ce11b0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/gx/tilix/terminal/monitor.d
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ private:

bool fireEvents() {
synchronized {
foreach(process; processes.values()) {
foreach(process; processes) {
if (process.eventType != MonitorEventType.NONE) {
onChildProcess.emit(process.eventType, process.gpid, process.activePid, process.activeName);
process.eventType = MonitorEventType.NONE;
Expand Down Expand Up @@ -138,7 +138,7 @@ void monitorProcesses(int sleep, Tid tid) {
// all open terminals. We need to get these using shell
// PID and will store them to raise events for each terminal.
auto activeProcesses = getActiveProcessList();
foreach(process; processes.values()) {
foreach(process; processes) {
auto activeProcess = activeProcesses.get(process.gpid, null);
// No need to raise event for same process.
if (activeProcess !is null && activeProcess.pid != process.activePid) {
Expand Down

0 comments on commit ce11b0b

Please sign in to comment.