由买买提看人间百态

topics

全部话题 - 话题: thread
1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
w*******y
发帖数: 60932
1
Fry's B&M CPU & Motherboard Combo Thread 3
This thread is being created to follow up on the wonderfully successful Fry'
s B&M CPU & Motherboard Combo Thread started back in January 2010 by
psychoshopper, along with the second iteration by me here which has lain
dormant too long and is now closed to replies. Combos have started appearing
again about 1-2 per month, so I'm creating another tracking thread in the
hopes that they'll continue.
I won't rehash the monologue that psychoshopper put into h... 阅读全帖
y****k
发帖数: 71
2
来自主题: Military版 - c++ thread 求助 (转载)
【 以下文字转载自 Programming 讨论区 】
发信人: ystdpk (ystdpk), 信区: Programming
标 题: c++ thread 求助
发信站: BBS 未名空间站 (Fri Jan 31 21:12:20 2014, 美东)
有一个50 million 行的文本。每行四列数字。
要求每行求一个特殊函数的值,把此值输出为第五列。次函数的求值所花的时间可能很
快,如果四个数比较小, 也可能要花到10几到100倍的时间如果数比较大。
想用36个boost thread。
有没有人能提供一个boost thread 的代码。谢谢了。
我写了一个下面的,但是cpu浪费比较严重,有的thread 结束早,有的结束慢。而且不
知道2000行一个thread是不是好的选择。
int batchSize = 2000;
int num_of_lines = 50100100;
bool end_of_file = false;
int pstart = 0;
boost::thread_group io;
while( ! end_of_file )
{
b... 阅读全帖
y****k
发帖数: 71
3
来自主题: JobHunting版 - c++ thread 求助 (转载)
【 以下文字转载自 Programming 讨论区 】
发信人: ystdpk (ystdpk), 信区: Programming
标 题: c++ thread 求助
发信站: BBS 未名空间站 (Fri Jan 31 21:12:20 2014, 美东)
有一个50 million 行的文本。每行四列数字。
要求每行求一个特殊函数的值,把此值输出为第五列。次函数的求值所花的时间可能很
快,如果四个数比较小, 也可能要花到10几到100倍的时间如果数比较大。
想用36个boost thread。
有没有人能提供一个boost thread 的代码。谢谢了。
我写了一个下面的,但是cpu浪费比较严重,有的thread 结束早,有的结束慢。而且不
知道2000行一个thread是不是好的选择。
int batchSize = 2000;
int num_of_lines = 50100100;
bool end_of_file = false;
int pstart = 0;
boost::thread_group io;
while( ! end_of_file )
{
b... 阅读全帖
b*m
发帖数: 34
4
问个multi threading code 题,同时请问高手mutil threading 编程有什么好书,网
站和教程推荐?
先问一下下面这个code 题:
写个queue, first in first out
用两个 thread
一个 thread pop head out
一个 thread poush back to tail
这个准确的应该如何写
如果有3 个以上的 thread 比如10 个thread 又应该如何写?
如何优化算法呢?
如果unlimited 个数的 thread 呢?
请问有没有上面这题相关的代码, 网站或者教程推荐呢?
mutil threading 编程讲的比较好有实际code 的又有什么好书,网站和教程推荐?
多谢大家帮忙。
d*r
发帖数: 238
5
来自主题: Java版 - java thread question
我现在正在做一个程序,遇到个问题。
我的程序是这样的:
user输入一组数,经过计算后,存到一个文件里。
因为运算的那一步比较复杂,所以user在输入一组数之后,要等一会才能输入第二组。
但是user并不需要知道结果,所以我想用threading来解决。
main thread用来接受user的输入,另一个thread(saving thread)平时处于idel。main
thread收到user
的输入后,send给saving thread。Saving thread接到main thread的message之后,开始
计算结果。
这个过程有点像http communication。但是只发生在两个thread之间。
现在问题是:
我需要一个像message pool一类的东西来存main thread发过来的message。
如果用VC的话,可以直接调用windows message queue。
如果用java怎么办呢?又没有现成的class?是在不行就只能自己写了。
y****k
发帖数: 71
6
来自主题: Programming版 - c++ thread 求助
有一个50 million 行的文本。每行四列数字。
要求每行求一个特殊函数的值,把此值输出为第五列。次函数的求值所花的时间可能很
快,如果四个数比较小, 也可能要花到10几到100倍的时间如果数比较大。
想用36个boost thread。
有没有人能提供一个boost thread 的代码。谢谢了。
我写了一个下面的,但是cpu浪费比较严重,有的thread 结束早,有的结束慢。而且不
知道2000行一个thread是不是好的选择。
int batchSize = 2000;
int num_of_lines = 50100100;
bool end_of_file = false;
int pstart = 0;
boost::thread_group io;
while( ! end_of_file )
{
boost::thread_group g;
vector > out;
out.resize(num_of_threads);

for( int i = 0; i < num_of_threads; ... 阅读全帖
z****e
发帖数: 54598
7
task
https://docs.oracle.com/javase/tutorial/uiswing/concurrency/simple.html
不过task用得少,在single thread环境中用得比较多
比如swift和javafx,都用了task来实现多线程
swift叫做dispatch queue
javafx就叫task
主要是防止gui thread被打断从而制造出来的一个东西
从根本上不让你用thread,这个是错误的
swift通过sprit kit来封装这个pattern
但是server side的游戏主循环thread的话,如果不让你用thread
你启动主循环,游戏结束后销毁,这两步怎么搞?
用thread很直观,你直接启动一个thread,把主循环逻辑放入thread,start/run
然后放入pool里面,游戏一局结束之后,把flag设置为false,那么这个thread自动销毁
用task来搞这个就非常蛋疼
o*******m
发帖数: 8
8
来自主题: Java版 - java thread question
You can use the concept of conneciton pool.Of course , it is thread pool here.
1)Init
create a pool of thread for computing
create a pool of thread for saving results
Logic of you program
1)Get Data from user
2)get a thread from computing pool
3)compute
4)return computing thread and get thread from saving pool
5)save and return saving thread
As simple as this, you do not need sync between threads.

l*****b
发帖数: 82
9
My current system is single-threaded with several modules which are
processed in sequence. I use SMTPAppender to capture error and send warning
emails with the following format:
[time][thread-1][module 1]start: XXXXXXX
[time][thread-1][module 2]XXXXXXX
[time][thread-1][module 3]XXXXXXX
[time][thread-1][module 4]ERR: XXXXXXX
After I change the system to multhithreaded, the logs will be tangled up
like:
[time][thread-1][module 1]start: XXXXXXX
[time][thread-2][module 1]start: XXXXXXX
[time][thread
z*******w
发帖数: 79
10
来自主题: Unix版 - C++ new/delete not thread safe?
I have a program with 2 threads running on Solaris using g++.
I noticed that I got core-dumped at one thread's:
new char[2];
gdb trace tell me it's inside malloc.
And I checked my program, it happend when one thread 1 send data
to another thread 2. In thread 1 it will delete some data, thread 2
will use new to create an instance.
After I comment the delete of thread 1, I got no core-dump at all.
So, I am very suspicious of g++'s new/delete is not thread safe.
Can somebody verify this? Th
n*m
发帖数: 23
11
来自主题: Java版 - Can Java thread return a value?

It is much similar to asynchronous call (may be I should say the same)
I've said, create your own runnable. Also, I suggest you can have your own
thread pool
public interface MyRunnable {
public int run ();
}
or
public class MyThread {
private Thread thread;
public int run () {
thread = new Thread();
thread.start();
...
return something;
}
}
...
MyThread mt = new MyThread ();
int result = mt.run();
wrap Thread running function in the implementation of
a******n
发帖数: 5925
12
来自主题: Java版 - what is the use of thread.yield()?
考试书上抄来的
What yield() is supposed to do is
make the currently running thread head back to runnable to allow other
threads of
the same priority to get their turn. So the intention is to use yield() to
promote
graceful turn-taking among equal-priority threads. In reality, though, the
yield()
method isn't guaranteed to do what it claims, and even if yield() does cause
a
thread to step out of running and back to runnable, there's no guarantee the
yielding
thread won't just be chosen again over all th... 阅读全帖
E********M
发帖数: 1372
13
来自主题: Programming版 - 关于process and threads的问题
请问具体怎么生成一个process, 然后这个process负责display 目录 (console 目录
就行了) 然后在这个process里创建3-4个threads ,每个thread 都负责去做一些
简单的公式计算呢呢?或者说,我怎么在process里用这些threads? 一下从data
structure的颗跳到system..有点摸不着边。。什么api 的都不懂。。。眼看作业今天
就要due 了。。
Write a program in C++ for a server (called math solver) which solves three
math problems: factorial (i.e. n!), exponent with base 2 (i.e. 2n), and cube
(i.e. n3). The server should be implemented as a process and the three
problems are implemented in three threads.
The server process ... 阅读全帖
o**2
发帖数: 168
14
来自主题: Programming版 - FMP supports UI thread in both Swing and SWT
上周 cplus2009 同学有个问题(http://www.mitbbs.com/article_t/Programming/31253813.html),涉及到GUI程序中线程之间转换的问题。就是controls都要在UIthread(Swing或SWT)里操作,而后台的logic要在非UIthread里操作。
我当时说了FMP可以轻易淘汰掉这种thread-base的编程技术,于是趁这个长周末,把对
UIthread的支持做进了FMP。想要试用的,可以在此download 2.0 jar:https://
github.com/fastmessenger/RI-in-Java/blob/master/fmp-2.0-bin.jar?raw=true
这里我借用 cplus2009 同学的问题作为范例:他的问题是有一个界面,上面有一个
BROWSE按钮,按了后弹出一个文件选择对话框。用户选好文件后,将文件名显示在
BROWSE按钮前面的text里。这里文件选择用来代表后台的耗时操作。
用FMP的,可以这样设计:一个Frontend class用来access UI controls... 阅读全帖
s********k
发帖数: 6180
15
【 以下文字转载自 JobHunting 讨论区 】
发信人: silverhawk (silverhawk), 信区: JobHunting
标 题: 一直没有很好理解thread join itself,哪位解惑一下
发信站: BBS 未名空间站 (Wed May 2 20:30:51 2012, 美东)
thread join目的是block调用thread知道特定thread结束。那thread join itself是为
什么?难道自己block 自己?
下面是一个简单例子伪代码(几乎所有编程语言都支持)
t1=threadstart();
t2=threadstart();
t1.join()
t2.join()
这里面我首先开始thread t1,然后我调用t1.join,那意思是t1 被block?直到t1自己
运行完?不是太理解这个意思,哪位解惑一下?
xt
发帖数: 17532
16

extends Thread可以直接用那个class做Thread class来对待.
implements Runnable在create thread的时候必须用new Thread()
来产生一个Thread.但是Runnable有个好处,就是java 不支持multi-
inheritance.所以如果你的class有super class,就不能再extend
Thread但是可以implements Runnable.
f******e
发帖数: 164
17
【 以下文字转载自 Linux 讨论区 】
发信人: francise (小飞猫), 信区: Linux
标 题: Linux thread和NPTL thread什么关系?
发信站: BBS 未名空间站 (Wed Mar 26 17:31:38 2008)
请问Linux thread和NPTL thread什么关系?通常用的pthread, POSIX thread和他们又
是什么联系?谢谢
N***m
发帖数: 4460
18
来自主题: Programming版 - boost::thread弱文
刚接触boost thread,遇到一个小问题。
为什么这样可以:
std::vector v;
boost::thread* mythread1=new boost::thread(f1);
v.push_back(mythread1);
而这样不可以(或者哪里写错了?)
std::vector v;
boost::thread mythread1(f1);
v.push_back(mythread1);
错误提示很长,似乎有什么allocator不对
s********k
发帖数: 6180
19
【 以下文字转载自 JobHunting 讨论区 】
发信人: silverhawk (silverhawk), 信区: JobHunting
标 题: 一直没有很好理解thread join itself,哪位解惑一下
发信站: BBS 未名空间站 (Wed May 2 20:30:51 2012, 美东)
thread join目的是block调用thread知道特定thread结束。那thread join itself是为
什么?难道自己block 自己?
下面是一个简单例子伪代码(几乎所有编程语言都支持)
t1=threadstart();
t2=threadstart();
t1.join()
t2.join()
这里面我首先开始thread t1,然后我调用t1.join,那意思是t1 被block?直到t1自己
运行完?不是太理解这个意思,哪位解惑一下?
k****y
发帖数: 781
20
Thread #1 和main thread 做sync.
Thread #1 和process都要access 同一个slow peripheral hardware, 我想吧大量硬件
处理部分移到thread, 目的就是不想block main thread. Main thread 里面也需要经
常access 这个hardware.
b***i
发帖数: 3043
21
前几天几个高手的提示,脑洞打开,才发现,原来Runnable的变量是共享的!另感谢提
醒,把错误的语法改了
class A {
int a;
A(int x){a=x;}
public void show(){System.out.println(a);}
}
...main(...
A a=new A(3);
A b=new A(4);
a.show();
b.show();
}
这个显示3, 4
但是
class A implements Runnable{
int a;
A(int x){a=x;}
public void run(){
.. wait for one second;
System.out.println(a);
}
}
.. main(..
A a=new A(3);
A b=new A(4);
Thread t1=new Thread(a);
Thread t2=new Thread(b)'
t1.start();t2.start();
}
这个显示两个3
所以才有Threa... 阅读全帖
t******n
发帖数: 11
22
来自主题: Unix版 - Does Linux support thread?
hi, I just have this problem when I am learning OS.
I couldn't find the keyword in most of my Linux books. Does
linux support thread?
I searched the the book "the concepts of OS", it says that
in Linux it uses a different concept of thread; every time
it needs a thread, it just clone a child thread.
Is this the tradition thread? or what is the real diffence
between process and thread?
Since multithread is an important concept in modern OS,
Linux should support it, I think.
BTW, Does C++ and Java
b***y
发帖数: 14281
23
来自主题: Military版 - c++ thread 求助 (转载)
没功夫看你的code,但是正确的做法不是平均分配任务给所有thread,而是所有thread
共享一个文件流,大家轮流一行行做,就不存在那个thread先结束的问题。
pseudo code大致如此
thread.run(file_handler) :
file_handler.lock()
while(file_handler)
{
job=file_handler.read_a_line()
file_handler.release()
do_some_time_consuming_things(job)
file_handler.lock()
}
file_handler.release()
return 0
main_thread()
{
file_handler=open_file(....)
...
for(i=0;i {
new_thread=thread()
new_thread.run(file_handler)
thr... 阅读全帖
S**Y
发帖数: 136
24
I am reading threads, and don't understand the thread-mapping model
why do we need to map user level threads to kernel threads anyway?
who can say say? thanks!
s********k
发帖数: 6180
25
thread join目的是block调用thread知道特定thread结束。那thread join itself是为
什么?难道自己block 自己?
下面是一个简单例子伪代码(几乎所有编程语言都支持)
t1=threadstart();
t2=threadstart();
t1.join()
t2.join()
这里面我首先开始thread t1,然后我调用t1.join,那意思是t1 被block?直到t1自己
运行完?不是太理解这个意思,哪位解惑一下?
s***0
发帖数: 117
26
来自主题: JobHunting版 - 请教如何保证函数时thread safe的?

to
I don't know how a boolean member variable would help.
The answer is mutexes and locks, you create a member variable mutex.
Here's some code, take out the lock and see what happens. I have a simple
cout here, but imagine you are doing some complex data operations within the
object.
#include
#include
class ThreadSafeClass
{
public:
ThreadSafeClass(int id): mThreadId(id){};
void operator()()
{
// This function will be altering the state, s... 阅读全帖
f******p
发帖数: 173
27
来自主题: JobHunting版 - Thread safe strcpy ??
搜了一下,https://groups.google.com/forum/#!topic/microsoft.public.vc.mfc/
yBrUjgvGwf8 里面有一个回复我觉得挺不错,大家来说说怎样
Much better to allocate a block of storage (either a general "new" or
your own sub-allocator), copy the string into it, pass it to the recipient,
and let the
recipient release it (either delete or your own deallocation back to your
pool of
buffers). This means that there is never more than one thread, ever, using
the storage.
You do not protect the function; you protect the area it is copying ... 阅读全帖
j****e
发帖数: 12067
28
【 以下文字转载自 Detective 讨论区 】
发信人: joycee (临河而羡鱼,不如归家结网), 信区: Detective
标 题: Thread 67 ---//sigh 十八岁以下莫入
发信站: BBS 未名空间站 (Sun Jul 11 19:56:05 2010, 美东)
发信人: gardenia (我是死猪,不怕开水烫), 信区: Piebridge
标 题: Thread 67 ---//sigh 十八岁以下莫入
发信站: Unknown Space - 未名空间 (Wed Apr 28 00:58:16 2004) WWW-POST
Thread ID: 67 Thread Owner: raison
Thread Title: untitled
0 raison
远看森林一片,近看红门两扇;滋溜钻进个小偷,外面留俩坏蛋。
1 huajimeiren
raison described the female genital area with 2 sentences
he then proceeds with a metaphor of the mal
g****y
发帖数: 212
29
来自主题: DotNet版 - .Net Thread question
A form will create 5 threads after it is loaded.
There is a button on the form that when pressed will call "Thread.sleep()" to
sleep for a while.
Question, Why other threads can't not move on when "button thread" or "main
thread" is sleeping? Any solution?
Thanks.
c******o
发帖数: 26
30
来自主题: DotNet版 - Thread suspend and resume
http://blogs.msdn.com/oldnewthing/archive/2003/12/09/55988.aspx
Why you should never suspend a thread
It's almost as bad as terminating a thread.
Instead of just answering a question, I'm going to ask you the questions and
see if you can come up with the answers.
Consider the following program, in (gasp) C#:
using System.Threading;
using SC = System.Console;
class Program {
public static void Main() {
Thread t = new Thread(new ThreadStart(Program.worker));
t.Start();
SC.WriteLine("
b*********n
发帖数: 1258
31
我在MainThread里同时start了两个thread: thread1, thread2
MainThread里等了2sec之后,想要kill thread2
thread2是去obtain一个url 的content,
一般情况thread2在2-3secs之后就return url content,但有时会take up to 10 sec
想要实现在2sec之后,
如果thread2没结束就强行结束,并返回nothing,
如果thread2结束了就返回url content.
用了:thread2.interrupt() 来强行结束thread2;
但是好像没有用呀,thread2还是在运行,并没有end
而且在我连续调用MainThread时,下一次的MainThread返回的url content
是上一次MainThread启动的thread2返回的url content
用的是jre1.6
哪位高手给指点指点吧,谢谢
MainThread:
Thread thread1 = new Thread(new multiThread11());
Thread threa
l****n
发帖数: 727
32
来自主题: Programming版 - 重复利用threads的问题
有一些threads做完工作后,不想让他们终止了,想下次循环回来继续用。
例如:
while (cond)
{
....
....
pthread_create(......, myfun, ...);

....
....

}
void * myfun (void * arg)
{
do something.
}
现在不想每次循环的时候都重新生成threads. 所以想让这些threads 等待下一次loop
回来的时候继续干活,当然干的是同样的活。
这样该怎么实现? 还是用condition variable?
例如这样:
void * myfun (void * arg)
{
while (1)
{
do something;
cond_wait();
}
}
然后主thread里再加一个signal?
那 pthread_create()是不是要加一个flag, 就是让第一次进入时候create threads,
以后再loop进来的时候就不再create了,就只signal.
是这么做嘛?有没有什么例程序?
大家帮忙解答一下,给点
a*****t
发帖数: 30
33
来自主题: Programming版 - 关于thread的stack
cs:app上这么描述的:
The memory model for the separate thread stacks is not as clean. These
stacks are contained in the stack area of the virtual address space, and are
usually accessed independently by their respective threads.
按这个说法,thread的stack是分配在 virtual memory的stack区域。
但是这样如何管理呢? 当一个thread退出后, 如果释放它的thread堆栈, 是不是就
在全局的堆栈区域里产生了一片空白区域? (因为线程的退出肯定不是按照他们建立顺序的逆序进行的。)
这点让我很不理解。
有没有什么资料能详细讲这些的? 多谢
S**Y
发帖数: 136
34
I am reading threads, and don't understand the thread-mapping model
why do we need to map user level threads to kernel threads anyway?
who can say say? thanks!
X****r
发帖数: 3557
35
It is the kernel, not the CPU, does the scheduling, and the threads
being scheduled by the kernel are called, by definition, kernel threads.
Sure, we can make that every user thread corresponding one kernel thread
and let the kernel to handle scheduling, context switch, etc, completely,
which is called 1:1 mapping.

them
i**p
发帖数: 902
36
来自主题: Programming版 - Daemon thread
In java, the daemon thread will be abort once all user (non-daemon) threads
exit.
How about pthread in linux? I don't remember pthread has the same concept.
It calls detached, right?
Another deference is detached thread is not abort after all the joinable or
calling thread is done, so that the process is still running. Right?
How is standardized C++ thread defined?
Please commend
i**p
发帖数: 902
37
来自主题: Programming版 - Daemon thread
To make it more clear and less argument, I re-word my post.
In pthread on Linux,
main() {
...
pthread_create(A)
pthread_create(B) // need much more time to run than thread A does
pthread_detach(B) // B is detached
pthread_create(C) // need much more time to run than thread A does
// but neither joined nor detached
...
pthread_join(A) // #1
return // #2
}
My understanding is
1. main() will wait at #1 until thread A is done.
2. o... 阅读全帖
c*********e
发帖数: 16335
38
多线程是在cpu里分时的,所以,每次切换到另外一个thread之前,要把当前的thread
的变量值都要存起来,这个就相当费时间和资源。当然,现在i5,i7之类的有多个cpu,
会好点。one thread, async就比这个好很多。
multi-thread programming,就像当初的c++的程序员忘记释放大的object的内存就会出
事一样,成了编程的一个瓶颈。java解决了c++的“程序员忘记释放大的object的内存
”的问题,但是,java自己又增加了一个棘手的难题,这就是multi-thread
programming.
s******d
发帖数: 278
39
读了您的笔记。
// 思考:如果=之前A已经和某线程关联了怎么办?
在C++ Concurrency in Practice Chapter 2.3 Transferring ownership of a thread
, 好像可以通过std::move操作
void some_function();
void some_other_function();
std::thread t1(some_function);
std::thread t2=std::move(t1);
t1=std::thread(some_other_function);
std::thread t3;
t3=std::move(t2);
t1=std::move(t3);
e**u
发帖数: 409
40
来自主题: _Python版 - can not start thread
写程序时报错,
File "/usr/lib/python2.4/threading.py", line 416, in start
_start_new_thread(self.__bootstrap, ())
thread.error: can't start new thread
只能到300多个thread,
如果改了ulimit的上限到unlimited最多也只能到500个thread
报同样的错
怎么才能解决呢?
多谢
j****e
发帖数: 12067
41
来自主题: Detective版 - Thread 67 ---//sigh 十八岁以下莫入
【 以下文字转载自 Piebridge 讨论区 】
发信人: gardenia (我是死猪,不怕开水烫), 信区: Piebridge
标 题: Thread 67 ---//sigh 十八岁以下莫入
发信站: Unknown Space - 未名空间 (Wed Apr 28 00:58:16 2004) WWW-POST
Thread ID: 67 Thread Owner: raison
Thread Title: untitled
0 raison
远看森林一片,近看红门两扇;滋溜钻进个小偷,外面留俩坏蛋。
1 huajimeiren
raison described the female genital area with 2 sentences
he then proceeds with a metaphor of the male genitals during a sexual
intercourse
2 alias
kick!!!!
玉体真无恙
凝脂霜月华
奇峦听风颤
花谷无雨滑
摇曳紫云帐
傲翘乌龟牙
乌苏船歌里
龙王正归家
3 frona
Oh, girl.
L********0
发帖数: 476
42
来自主题: Automobile版 - 请推荐一个rebuild thread的工具
repair thread用的工具无非就是tap and die,对操作有一定要求,一定要用tapping
oil(可以用WD-40不过最好是tapping oil)。
stud上的thread如果被磨掉了是不太可能restore到原来的地步的,你可以选择tap小一
号的thread然后用对应型号的nut。
另外如果是female thread的话可以考虑helicoil或者timesert。helicoil比较常见但
是可靠性很差,用不上几年又坏很麻烦,强烈建议timesert。
t****t
发帖数: 6806
43
you always start with one thread. if there is no thread, there is no
execution. "other" threads have to be created from some an existing thread.
wh
发帖数: 141625
44
来自主题: LeisureTime版 - 湘绣:Loose Threads, Rich Colors (转载)
【 以下文字转载自 Translation 讨论区 】
发信人: wh (wh), 信区: Translation
标 题: 湘绣:Loose Threads, Rich Colors
发信站: BBS 未名空间站 (Mon Dec 22 12:16:01 2014, 美东)
今天翻译的文章里有这么一句话,说湘绣的特色是“loose threads and rich colors
”。我起先翻译成“针脚疏松,色彩鲜明”。但“针脚疏松”听着像是贬义似的。查维
基、百度的湘绣词条,都是说针脚严密、整齐,没有说疏松的。在百度词条里找到一句
“线条洒脱”,我如获至宝地拿来用了,想来应该是这个意思?如果是的话,这个
loose threads的英译可实在不确切,要是我就翻成free threads...哈哈。
顺便贴几个线条洒脱、色彩鲜明的湘绣,你们最喜欢哪一幅?祝版友们节日快乐!
(该绣屏为孙中山先生与宋庆龄结婚时陈列的湘绣花鸟条屏。在仿古色的缎料上,以传
统中国工笔画的表现形式,分别做紫藤、牡丹、菊花、梅花并配题诗相映衬,具有传统
文人画的思想内涵。每幅均有比翼双飞的双鸟,象征同心和谐的报... 阅读全帖
wh
发帖数: 141625
45
【 以下文字转载自 Translation 讨论区 】
发信人: wh (wh), 信区: Translation
标 题: 湘绣:Loose Threads, Rich Colors
发信站: BBS 未名空间站 (Mon Dec 22 12:16:01 2014, 美东)
今天翻译的文章里有这么一句话,说湘绣的特色是“loose threads and rich colors
”。我起先翻译成“针脚疏松,色彩鲜明”。但“针脚疏松”听着像贬义似的。查维
基、百度的湘绣词条,都是说针脚严密、整齐,没有说疏松的。在百度词条里找到一句
“线条洒脱”,我如获至宝地拿来用了,想来应该是这个意思?如果是的话,这个
loose threads的英译可实在不确切,要是我就翻成free threads...哈哈。
顺便贴几个线条洒脱、色彩鲜明的湘绣,你们最喜欢哪一幅?祝版友们节日快乐!
(该绣屏为孙中山先生与宋庆龄结婚时陈列的湘绣花鸟条屏。在仿古色的缎料上,以传
统中国工笔画的表现形式,分别做紫藤、牡丹、菊花、梅花并配题诗相映衬,具有传统
文人画的思想内涵。每幅均有比翼双飞的双鸟,象征同心和谐的报喜... 阅读全帖
l******9
发帖数: 579
46
Hi,
I am trying to do parallelization for a computing intensive problem.
I am working on a Linux cluster where each node is a multicore processor.
e.g. 2 or 4 quad-core processor per node.
I want to reduce latency and improve performance as much as possible.
I plan to use multiprocessing and multithreading at the same.
Each process run on a distinct node and each process spawn many threads
on each node. This is a 2 level parallelism.
For multiprocessing, I would like to choose MPI.
For multithre... 阅读全帖
k**********g
发帖数: 989
47
Thread creation and process forking are different. Do not be confused.
To create a thread, you must specify a starting point (usually a function
pointer) where the thread will start executing.
t1 will execute the starting function you specified, and will continue to
execute until it finishes.
The main thread will just continue with the next line.
c******o
发帖数: 26
48
来自主题: DotNet版 - Threading Question
A situration like this:
1) Application A has 2 threads running
2) Each thread is running a public method of class B,
3) in the public method of class B, it is using an instance
of Class C to do some parsing work which takes a long time ( a few seconds)
instance of C is labeled ThreadStatic
When running on a single-CPU computer, since only one thread can run
concurrently, there is no problem. Issue comes in when running on a
quad-CPU box and 2 threads are running concurrently. The instances of
cl
W********n
发帖数: 254
49
这两天在看这个Peter Ritchie的blog。搜到他的blog是因为查找一些关于.net
threading的问题,结果第一个结果就显示他的blog: Thread.Sleep is a sign of a
poorly designed program。感觉他说的Thread.Sleep坏处就是bad for timing和阻塞
而且无法自由控制。然后此人建议把所有Thread.Sleep换成timer,把原本sequential
的线程工作代码换成timer与event控制机制,有没有高手讨论下这样做到底好处有多大
呢?个人感觉如此一下本来简单的线程会变得很复杂容易出错。
l******9
发帖数: 579
50
Hi,
I am trying to do parallelization for a computing intensive problem.
I am working on a Linux cluster where each node is a multicore processor.
e.g. 2 or 4 quad-core processor per node.
I want to reduce latency and improve performance as much as possible.
I plan to use multiprocessing and multithreading at the same.
Each process run on a distinct node and each process spawn many threads
on each node. This is a 2 level parallelism.
For multiprocessing, I would like to choose MPI.
For multithre... 阅读全帖
1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)