From: Marcio Carneiro Date: 2011-05-12T09:44:26+09:00 Subject: Re: how to do task-level parallelism in Windows? --90e6ba6e8c688a9ef304a3097de0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Yes, ge ridden of windows. 2011/5/11 Zd Yu > Christopher Dicely wrote in post #997903: > > On Tue, May 10, 2011 at 9:43 PM, Zd Yu wrote: > >> Joel VanderWerf wrote in post #997899: > >>> On 05/10/2011 08:38 PM, Zd Yu wrote: > >>>> I want to achieve better performance through parallelism. The > >>>> thread-level parallelism is not an option, because it is not *really= * > >>>> parallel. > >>> > >>> Is jruby acceptable? Jruby threads do make use of multiple processors= . > >> > >> I need to use win32ole. I am afraid JRuby cannot do this. > > > > There is a jruby-win32ole gem -- I haven't used it, but it sounds like > > it may do what you want. > > I just tried it. It seems there are some compatible problems. My code > does not work with JRuby + jruby-win32ole, although it works well with > ruby + win32ole. > > The error looks like: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > Dispatch.java:-2:in `invokev': org.racob.com.ComFailException: Invoke > of: Find > Source: > Description: > > from Dispatch.java:243:in `invokev' > from Dispatch.java:187:in `callN' > from RubyWIN32OLE.java:203:in `invokeMethodOrGet' > from RubyWIN32OLE.java:112:in `method_missing' > from RubyWIN32OLE$i$0$0$method_missing.gen:65535:in `call' > from JavaMethod.java:642:in `call' > from RuntimeHelpers.java:497:in `call' > from CachingCallSite.java:345:in `callMethodMissing' > from CachingCallSite.java:249:in `cacheAndCall' > from CachingCallSite.java:71:in `call' > from C:\my_tool.rb:1362:in `method__98$RUBY$find' > > > my code: (Excel manipulation) > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > keys =3D @workbook.Worksheets("sheet name").Range( "A1" ).EntireRow > > current =3D keys.Find( value, > nil, > WIN32OLE::XlValues, > WIN32OLE::XlPart, > WIN32OLE::XlByColumns, > WIN32OLE::XlNext, > false, > false, > false ) > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > it seems the 'Find' method cannot be invoked. > > -- > Posted via http://www.ruby-forum.com/. > > --=20 Analista de Sistemas *MBA em Log=C3=ADstica, Mobiliza=C3=A7=C3=A3o e Meio Ambiente/GETRAM =E2=80= =93 Ger=C3=AAncia Executiva de Transportes e Mobiliza=C3=A7=C3=A3o* * * Provedor de Servi=C3=A7os na InterNet Aten=C3=A7=C3=A3o: Esta carta pode conter anexos no formato *ODF* (*Open Do= cument Format*)/*ABNT* (extens=C3=B5es *odt*, *ods*, *odp*, *odb*, *odg*). Antes d= e pedir os anexos em outro formato, voc=C3=AA pode instalar gratuita e livrem= ente o *BrOffice* (http://www.broffice.org) ou o seguinte Aditivo para Microsoft Office (R) (http://www.sun.com/software/star/odf_plugin/get.jsp). Contato em *Federalista@Marcio.eng.br * *Participe do* *I*F*D*F . Voc=C3=AA sabe o que =C3=A9 a *SUA* liberdade ? Participe da *Comunidade dos Profissionais Liberais* na InterNet * * Voc=C3=AA sabe porqu=C3=AA o Socialismo *PRECISA MATAR *? =C2=BB Jornal *ACORDA BRASIL * - liberdade, desenvolvimento e pol=C3=ADtica. =C2=BB Ponto Cr=C3=ADtico - e-jornalismo bra= sileiro, em edi=C3=A7=C3=B5es di=C3=A1rias. =C2=BB Instituto Liberal do Rio de Janeiro - Se voc=C3=AA acha que neoliberalismo e liberalismo s=C3=A3o a mesma coisa, = =C3=A9 melhor visitar esse endere=C3=A7o. =C2=BB Instituto Liberdade =C2=BB The Federalist Patriot =C2=BB Banco de Dados Pol=C3=ADticos das = Am=C3=A9ricas =C2=BB Meira Penna - Um dos mais eminentes pensadores liberais do Pa=C3=ADs, respeitado internacionalmente. =C2=BB Voc=C3=AA acha o voto eletr=C3=B4nico seguro? Se sim, melhor conhece= r estes argumentos t=C3=A9cnicos ... =C2=BB Pro Ratio Libertas - estudos sobre a Libe= rdade, Cidadania e Sociedade =C2=BB Sobre Economia, visite a Funda=C3=A7=C3=A3o Regional de Economia de Santa Maria/RS =C2=BB Impostos: constata=C3=A7=C3=A3o de como se pratica a concentra=C3=A7=C3=A3o de renda = por aqueles que falam em distribui=C3=A7=C3=A3o de renda... =C2=BB Jornalista Diego Casagrande : Um= site com uma excelente vis=C3=A3o cr=C3=ADtica sobre a pol=C3=ADtica e economia = nacional. =C2=BB Pol=C3=AAmico, ousado, conhecimento invej=C3=A1vel, Olavo de Carvalho deve ser lido por quem quer ver al=C3=A9m das linhas da imprensa e= dos movimentos pol=C3=ADticos. =C2=BB Landell de Moura - Conhe=C3=A7a= um grande brasileiro, que n=C3=A3o entrou para a Hist=C3=B3ria mundial por causa de...brasileiros. =C2=BB Quer ver a m=C3=ADdia nua em pelo? Midia Sem M=C3=A1scara =C2=BB Se voc=C3=AA quer saber como se faz uma "obra fara=C3=B4nica" sem um= centavo dos cofres p=C3=BAblicos, conhe=C3=A7a a Chesapeak Bay =C2=BB Nunca leu o livro "*O Caminho da Servid=C3=A3o"* de Friederich Hayec= k? O livro =C3=A9 imperd=C3=ADvel mas pode come=C3=A7ar lendo um =C3=B3timo e animado resumo . Voc=C3=AA acredita em profecias ? O ab=C3=B4rto =C3=A9 evang=C3=A9lico ? Um Pa=C3=ADs =C3=A9 feito de homens e livros. "Monteiro Lobato" ... mas =C3=AAle =C3=A9 de "direita" ... n=C3=A9? A energia e a honestidade de Dilma . A dignidade de Dilma! [image: Dilmaldade.png] --90e6ba6e8c688a9ef304a3097de0--