Displaying 20 results from an estimated 900 matches similar to: "Threading issue"
2007 Oct 21
2
Simulating RUBY_CRITICAL
Hi all,
I''ve added some critical section methods to the Windows::Synchronize
module in the windows-pr library (in CVS). Looking at the RUBY_CRITICAL
macro from rubysig.h, it basically looks like this (in pure Ruby):
def RUBY_CRITICAL(&block)
critical_section = [0].pack(''L'')
InitializeCriticalSection(critical_section)
2010 Nov 20
1
CRITICAL_SECTION hang my application
Good Day, dear wine users :) .
I am the developer of program, which must work under Wine and Windows. it has two threads, and these threads use one function to add text to Rich text box. When they try to add texts in parallel, a mixed text appear. So I decided to use critical section. When main thread tries to add text, the text adds perfectly, but when the second thread tries to add text - it
2004 Sep 16
0
[LLVMdev] Files to lib/System/Win32
This version has been committed to CVS with one minor change:
I made the warning about caller calling LeaveCriticalSection a little
more prominent. Patch is here:
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20040913/018371.html
Reid.
On Thu, 2004-09-16 at 01:08, Jeff Cohen wrote:
> Uh, use this version instead... (It's way past my bedtime :))
>
> On Thu, 16 Sep
2004 Sep 17
2
[LLVMdev] Files to lib/System/Win32
Alas, you missed a serious bug in that same function. Patch attached to
fix it and improve some comments. No more late night coding for me :)
That leaves Path.cpp. Once that's done I can actually try and execute
this stuff.
On Thu, 16 Sep 2004 08:55:28 -0700
Reid Spencer <reid at x10sys.com> wrote:
> This version has been committed to CVS with one minor change:
> I made the
2013 Feb 25
5
Puppet execution hangs for long periods of time
Hi,
I wrote a little "hello world" script and I am a little concerned by
execution that hangs for long periods of time.
*computer:*
Windows XP Professional Service Pack 3
Intel(R) Xeon(R) CPU
W3550 @ 3.07GHz
3.07GHz, 3.50 GB of RAM
*init.pp:*
class hello
{
notice(''Hello world!'')
}
*command line:*
puppet apply --debug -e ''include hello''
2002 Mar 21
1
Ogg Vorbis and DirectSound streaming
hi,
I downloaded the vorbis-sdk-1.0rc3 and wrote an application that plays ogg
files using DirectSound(win32 application). It uses streaming technique -
I'm implementing and passing IStream interface to the DirectX. The interface
is used by DirectX to fill his buffers during playing. DirectX is assuming
that it's readind from a wav file, so the interface decodes on-the-fly so
that
2011 Oct 13
5
Using all cores during compile
Is there anyway to use all 4 cores on my quad core during compilation? It appears I am only using 1 core. I am hoping there is a flag I can pass to the makefile.
Alternatively, I could probably break the makefile in four different makefiles for compiling and a separate makefile for linking. From there I could execute the compile makefiles seperately and finally the link makefile when the others
2010 Mar 31
2
Simplifying particular piece of code
Hello, everyone
I have a piece of code that looks like this:
mrets <- merge(mrets, BMM.SR=apply(mrets, 1, MyFunc, ret="BMM.AV120",
stdev="BMM.SD120"))
mrets <- merge(mrets, GM1.SR=apply(mrets, 1, MyFunc, ret="GM1.AV120",
stdev="GM1.SD120"))
mrets <- merge(mrets, IYC.SR=apply(mrets, 1, MyFunc, ret="IYC.AV120",
2004 Sep 16
2
[LLVMdev] Files to lib/System/Win32
Uh, use this version instead... (It's way past my bedtime :))
On Thu, 16 Sep 2004 01:05:52 -0700
Jeff Cohen <jeffc at jolt-lang.org> wrote:
> Here's the free-of-copyrighted-Microsoft-code version of Signals.cpp.
>
> Actually, I'm not sure if the original would work on NT/2000/XP. It was doing
> stuff that's only supposed to be done on Win95/98/ME.
>
2009 Jul 21
0
Accessing list object from within a function as a list element
Hi -
I have a list (call it 'mylist') with the following elements: (i) a
function (call it 'myfunc' and expressed as 'mylist$myfunc') and (ii)
a variable (call it 'myvar' and expressed as 'mylist$myvar'). Since I
use mylist as a pseudo-class (I assign mylist to multiple different R
objects), I would like to access the mylist R object from within the
2002 Aug 06
1
re| `By reference'
David Brahm <brahm at alum.mit.edu> wrote:
>VBMorozov at lbl.gov wrote:
>> I would like to pass variables to a function in R in "by reference"...
>Just in case the ensuing discussion got too esoteric, here's one simple
answer:
>R> x <- 1:10
>R> MyFunc <- function(x, zz) assign(deparse(substitute(zz)), sum(x), 1)
>R> MyFunc(x,y)
>R>
2011 Feb 18
1
debugger() fails if "..." in function arguments
Dear all,
I'm having a problem with debugger() in both R 2.8.0 and R 2.12.0.
Probably also versions in-between.
I don't see it logged in the bug database, but it's hard for me to
imagine that no-one else has encountered it. So my question is whether
it's a known problem with a workaround, or do I log it as a new problem?
The situation is that if I use
2009 Aug 06
1
Using 'field names' of a data.frame in a function
I may be doing this wrong! but I have a function which I have simplified a lot below. I want to pass some 'field names' of a data-frame to the function for it to then do some manipulation of.
Here's my code:
#build a simple dataset
mydataset = data.frame (
2011 Aug 24
1
Passing a large amount of parameters to a function
Hello,
I have a function with a long list of parameters (of different types,
numeric and string)
myFunc <-function(p1, p2, p3, p4, p5...etc)
{
do.something(p1,p2,....)
}
I want to loop over this to provide a different set of parameters to the
list every time.
for (ii in 1:N)
{
myFunc(p1(ii), p2(ii),....etc)
}
I would like to simplify the notation and use some kind of structure, maybe
2002 Aug 03
2
variable scope
Dear R-guRus:
I would like to pass variables to a function in R in "by reference",
e.g Fortran style.
For example, suppose I have the following code
x<-c(1:10)
y<-1
MyFunc<-function(x,y) {y<-sum(x); return(NULL)}
MyFunc(x,y)
print(y)
in this case print(y) will produce "1" instead of 55 (which is sum(x)) -
how do I make sure that afte the function is run, y
2002 Aug 03
2
variable scope
Dear R-guRus:
I would like to pass variables to a function in R in "by reference",
e.g Fortran style.
For example, suppose I have the following code
x<-c(1:10)
y<-1
MyFunc<-function(x,y) {y<-sum(x); return(NULL)}
MyFunc(x,y)
print(y)
in this case print(y) will produce "1" instead of 55 (which is sum(x)) -
how do I make sure that afte the function is run, y
2007 May 03
1
Imports/exports of S4 methods
I have a question about what to do in the following situation (please bear with
the setup):
Package A defines an S4 generic 'foo' and as well as S4 methods for 'foo' and has
exportMethods("foo")
in its NAMESPACE file.
Package B defines another method for 'foo' for class "bar" and has
importFrom(A, "foo")
exportMethods("foo")
2008 Mar 27
1
A faster way to compute finite-difference gradient of a scalar function of a large number of variables
Hi All,
I would like to compute the simple finite-difference approximation to the
gradient of a scalar function of a large number of variables (on the order
of 1000). Although a one-time computation using the following function
grad() is fast and simple enough, the overhead for repeated evaluation of
gradient in iterative schemes is quite significant. I was wondering whether
there are
2004 Sep 09
4
scoping rules
Can someone help me with this simple example?
sq <- function() {
y <- x^2
y
}
myfunc <- function() {
x <- 10
sq()
}
myfunc()
executing the above in R yields:
> myfunc()
Error in sq() : Object "x" not found
I understand that R's scoping rules cause it to look for "x" in the
environment in which "sq" was defined (the global environment in
2008 Nov 04
1
Help needed using 3rd party C library/functions from within R (Nvidia CUDA)
Hello,
I'm trying to combine the parallel computing power available through NVIDIA
CUDA (www.nvidia.com/cuda) from within R. CUDA is an extension to the C
language, so I thought it would be possible to do this.
If I have a C file with an empty function which includes a needed CUDA
library (cutil.h) and compile this to an .so file using a NVIDIA compiler
(nvcc), called 'myFunc.so' I