wrong lines marked on error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
valide |
New
|
Medium
|
Unassigned |
Bug Description
Operating system: Win7 64Bit
Vala version: 0.7.8
Valide version (or svn revision): 0.6.1
The attached code throws some errors. The console clearly shows that the
first error is in line 8 (8.28-2.28). But valide marks multiple lines at
some other location on double click of that first error
namespace H32
{
public class SynchronizedSta
{
private LinkedElement<T>? top;
private Mutex mutex;
public SynchronizedSta
{
top = null;
mutex = new Mutex();
}
public T pop()
{
mutex.lock();
if (top == null)
{
return null;
}
else
{
var ret = top.element;
top = top.next;
return ret;
}
}
public void push(T e)
{
mutex.lock();
var le = new LinkedElement<T>();
le.element = e;
if (top == null)
le.next = null;
else
le.next = top;
top = le;
mutex.
}
}
private class LinkedElement<T>
{
public T element;
public LinkedElement<T>? next;
}
public delegate void Func(Object);
public class ThreadPool
{
private Func func;
private SynchronizedSta
private int maxThreads;
private int runningThreads;
private Mutex mutex;
public ThreadPool(Func f, int maxThreads, bool dings)
{
this.func = f;
this.
this.
stack = new SynchronizedSta
mutex = new Mutex();
}
public void push(Object data)
{
stack.
createThr
}
private void* createThread()
{
var res = this.func(
finishThr
return res;
}
private void createThreadIfN
{
mutex.lock();
if (runningThreads < maxThreads)
{
unowned createrThread = Thread.
}
mutex.
}
private void finishThread()
{
mutex.lock();
runningTh
mutex.
}
}
}