由买买提看人间百态

topics

全部话题 - 话题: thread
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
c********1
发帖数: 5269
1
I have the same 感觉.
c/c++, java should handle multi-threading better than python and php.
z*y
发帖数: 1311
2
来自主题: Programming版 - Daemon thread

the
Thread is not process, how could a thread live if the process exits?
b**********h
发帖数: 419
3
工作里用Spring 框架,把Thread都包装好了,
现在去面试的时候,multi-threading都是必问问题,
简单的synchronize还能应付得过去,
有的面试官往深里头问,notify的应用,如何debug多线程什么的,我就只懂得皮毛了
有什么好project练习多线程吗?
w****e
发帖数: 1883
4
多线程的context switch overhead早就可以做的非常小了。即使只有一个CPU,除非你
的程序是永远100% CPU不停地算,不然的话很多real world的application大部分时间
都花在等待慢几个数量级的IO上,这种时候多线程当然比单线程效率高多了。
至于C++的多线程就别拿出来说了,简直是尼玛反人类。用了几年pthread, 突然用上了
Java thread,有一种指哪儿打哪儿的感觉,想怎么操纵怎么操作。棘手的难题?看不出
来。我觉得Java最大的贡献之一就是多线程编程在保留了易用性的同时还提供了强大的
功能性。当然,这一切要归功天才的Doug Lea.

thread
w***g
发帖数: 5958
5
pthread是很傻x. 不过C++11以后C++线程已经满血复活了, 不会比java差.
我这里有一个简单源程序攻略 (以前贴过), 总结了
C++11里线程相关的主要特性.
程序里主要是中文注释, 浏览器看可能有乱码. 需要下下来用编辑器看.
http://www.wdong.org/thread-tutorial.cpp
可以运行, g++编译用
g++ -pthread -std=c++11 thread-tutorial.cpp
C++是用来写算法的, 不适合实现业务逻辑.
s********k
发帖数: 6180
6
来自主题: Programming版 - golang 一个thread safe singleton问题
比如需要初始化client,保证thread safe singleton, 看到很多资料都用once.Do(
func(){})这样来做,但是同事看到如果在package用init,If multiple packages
import a package P, P will be initialized only once. 这里的init是不是也是
thread safe?
c***o
发帖数: 131
7
来自主题: Software版 - 自动Click new thread的软件?
总想在新的Thread出来后第一时间Click进去但总是被别人抢先,而且还总是在新
Thread出来后1、2 秒左右。猜想他们可能用了软件。有这样的软件吗?相应的英文名
字是什么?多谢各位。
m*****m
发帖数: 27
8
来自主题: Unix版 - Does Linux support thread?
Yes, Linux supports thread.
Read Chapter11: POSIX threads from "Beginning Linux Programming"
by Stones and Matthew. This will give you a pretty good idea.
f****y
发帖数: 70
9
we have one application to run on solaris server. the application
have many threads.
I want to know how many threads the solaris server can support .
can anyone tell me? thanks .
w*********n
发帖数: 84
10
I remember a guy made post saying that some indian guy is
hash on Security and try to make millions of processes/threads
on the server machine. hehe.
I think as long as virtual MEM is able to handle,
thread can be created.
c**z
发帖数: 669
11
象实现一个queue之类的
笼统的说有什么办法?
如果在里面放一个 member variable, set it to true when the thread starts to
execute, and flip it when the thread returns.
请问这样可以吗?
c**z
发帖数: 669
12
象实现一个queue之类的
笼统的说有什么办法?
如果在里面放一个 member variable, set it to true when the thread starts to
execute, and flip it when the thread returns.
请问这样可以吗?
w*******y
发帖数: 60932
13
Luxury Collection 600-Thread Count Damask Sheet Set::
http://www.kohls.com/kohlsStore/bedandbath/sheets/luxury/PRD~c9727/Luxury Collection 600Thread Count Damask Sheet Set.jsp
original $59.99-179.99
sale $29.99-$44.99
Use coupon NEXTORDER20 & FREECCDEC for 20% off and free shipping
respectively.
You'll sleep soundly using this Luxury Collection sheet set. The damask
striped pattern will match a variety of comforters and other bedding
coordinates. Count on quality when you use this bed sheet set.... 阅读全帖
w*******y
发帖数: 60932
14
Link:
http://www.kohls.com/kohlsStore/saleevents/1203/bedbath/ph61sheetsets/PRD~c4090/Luxury Collection 600Thread Count Sateen Sheet Set.jsp#
#" rel="nofollow" target="_blank" onclick="_gaq.push(['_trackEvent', 'thread
', 'click', '2449934 - luxury-collection-600thread-count-sateen-sheet-set-
reg-59.99179.99-now-29.9944.00-price-drops-additional-25-off-in-cart-with-
additional-20-off-with-free-shipping']);">http://www.kohls.com/kohlsStore/s...t+Set.jsp#
Example King Sheets are 44.99, when added... 阅读全帖
w*******y
发帖数: 60932
15
overstock has the Renaissance Reversible 600 Thread Count Cotton 3-piece
Duvet Cover Set for $39.99 + $2.95 shipping.
Similar items at amazon priced at $55.79, and $79.99 at smartbargains.com
two sizes: full/queen, king
7 colors. (please refer to the amazon page, better color discription)
remember to use cashback programs; urlhasbeenblocked has 5% cashback
10% coupon code is still valid: 121728
total: $38.93 and $36.98 after cashback
Link:
http://www.overstock.com/Home-Garden/Renaissance-Rever... 阅读全帖
w*******y
发帖数: 60932
16
Piggybacking off last year's Samsung thread, I'd like to generate a wiki for
the 3 major plasma brands for 2011. Most of the manufacturers place
restrictions on pricing and don't allow online retailers to show prices
until final checkout. This thread will allow us to weed through those
restrictions and find the best current prices.
I am much more informed with pricing on the higher end models for all 3
manufacturers, but admittedly, I could use some help on the lower end.
Please help me keep t... 阅读全帖
w*******y
发帖数: 60932
17
They are on sale for half off. So when you add these coupons you are getting
them for around 65% off and free shipping. This is for Kohls card holders
only. They have name brand ones, but these do have 5 star ratings by all 14
reviewers. If this helps you please don't forget to rep and thumbs up a
good deal.
FS No Minimum with promo code: TREAT4MVC. This is also a cardholder only
code. to catluver and veronica1
30% off Valid Friday 1/13 to Sunday 1/22 @ Kohls.com when using your Kohl's
Char... 阅读全帖
h***e
发帖数: 7320
18
来自主题: _pennystock版 - 【Biotech Event Thread】2009 Oct
我们开个主题,肥猪和哈密我每天更新,希望大家能找到好匹克
如果大家发现新的event, 也请及时跟帖update,非常感谢 :)
Event Thread 不是推荐股票,欢迎讨论。
先给大家总结10月份的,以后每月开一贴哈
====================================
发信人: justsing (飞天的猪), 信区: pennystock
标 题: Re: 【Biotech Event Thread】
发信站: BBS 未名空间站 (Thu Oct 15 22:23:05 2009, 美东)
potentially stock-moving biotech events for October:
Oct. 5-6
JMP Securities Healthcare Focus conference
Oct. 7-8
Cowen & Co. 12 th Annual Therapeutics Conference
Oct. 8
FDA approval decision date for Spectrum Pharmaceuticals'(SPPI Quo... 阅读全帖
g***t
发帖数: 1279
19
来自主题: _pennystock版 - Monthly Pick thread (转载)
【 以下文字转载自 Chinook 俱乐部 】
发信人: chinook (Base Loaded), 信区: Chinook
标 题: Monthly Pick thread
发信站: BBS 未名空间站 (Wed Nov 2 02:22:16 2011, 美东)
几天不灌,大家受精了,lol。
出来了开这个thread算个见面礼,过些日子礼品臭了大家别怪。今天读季报读的高兴,
就胡吹个pick。以后不担保每月都有pick。
2011.11 pick
===
RDN
===
start date: 11/1/11
start price: $2.55
Price target:
=============
6 month price goal: $5
2 year price goal: $14
type:
=====
small cap with high return and high risk, so no high stake please
Worst case:
==========
risk-to-capital ratio may get to 25 before ... 阅读全帖
j****e
发帖数: 12067
20
来自主题: Detective版 - thread 50
【 以下文字转载自 Piebridge 讨论区 】
发信人: yaz (柏林低温武警), 信区: Piebridge
标 题: thread 50
发信站: Unknown Space - 未名空间 (Tue Apr 27 23:37:07 2004) WWW-POST
yaz
就是拿了,也不能池浴。
在现在这个敏感时期,池浴一定要小心。
mrbean
even with tampax, you should not take bath.
bath can be harmful in this sensitive time
alias
wokao!!!! I fule you!
卫生巾,护妹妹
月事时节莫进水
洗澡也能坏宝贝
unless
The pad is to protect your little sister
When in period there should be no water
Even tub bath or shower
They are harmful to your flower
unknowngirl
纸巾丹碧护小妹
保持干躁一定对
切记淋浴泡澡水
细菌
j****e
发帖数: 12067
21
来自主题: Detective版 - thread 68
【 以下文字转载自 Piebridge 讨论区 】
发信人: yaz (柏林低温武警), 信区: Piebridge
标 题: thread 68
发信站: Unknown Space - 未名空间 (Tue Apr 27 23:45:21 2004) WWW-POST
yaz
上上下下吴官正
反腐倡廉尉健行
huajimeiren
Mr. Wu Guanzhen, a Chinese government officer, commented,
looking up looking down
no office is upright
Mr. Wei Jianxing, another Chinese government officer,
observed,
anti-corruption campaignyields no result
raison
吴官正说: 上看下看,无一官正
尉建行说: 反腐运动未见成效
frona
"No matter how you look, no officer is good", says Wu Guan Zheng.
"The event of
j****e
发帖数: 12067
22
来自主题: Detective版 - Thread ID: 82 Owner: yaz Title: 拼了
【 以下文字转载自 Piebridge 讨论区 】
发信人: flybird (飞翔鸟), 信区: Piebridge
标 题: Thread ID: 82 Owner: yaz Title: 拼了
发信站: Unknown Space - 未名空间 (Wed Apr 28 16:52:26 2004) WWW-POST
0 yaz 舍得一身剐,敢把皇帝拉下马
1 huajimeiren pull the lord off his horse
sashimi me, can it be any worse?
2 alias 有个美人打扮得十分妖娆性感,踩着高跟鞋摇曳多姿,笼着超短裙春色无边。然
而走路太慢,挤公车的时候老是吃亏。
一天美人挤公车的时候又吃亏,着急的时候只听得噗嗤一声,裙子后面破了。美人羞愧难
当,急忙去捂,结果前面又破了。正当众人饱餐秀色,叹为观止的时候,美人趁众人不注
意一个箭步挤上了公车。
“舍得一身剐,敢把皇帝拉下马。老娘身材好,有胸有腿,就喜欢裸奔,怎么着?”美人
如是说。
3 frona I don't know what you heard about
c**********u
发帖数: 7276
23
来自主题: Military版 - thread的头像是谁?
我日,感情thread就是糟蹋来的啊。现在看到郑大世, 俺就要翻胃了。
y****k
发帖数: 71
24
来自主题: Military版 - c++ thread 求助 (转载)
非常感谢回复。真的学到东西了。
不过我还想问一下。
如果一次lock读入2000行会不会快点?
另外一个问题是,用这种方法有没有什么方法保证输出和原来的文本一样的顺序?

thread
a*i
发帖数: 126
25
来自主题: Military版 - c++ thread 求助 (转载)
读一行,attach 一个行号。
输出都丢到一个buffer里 (linked-list?),再起一个thread 作输出。
a*i
发帖数: 126
26
来自主题: Military版 - c++ thread 求助 (转载)
attach 没啥特别的意思。
把读入的每一行当作一个object对待。这个object还有一些fields可以hold行号和运算
结果。
给行号的index是全局递增的变量,所以不同的thread access的时候要注意lock.
兄弟还在学校吧?这都是工业界常规solution。不牛。
y****k
发帖数: 71
27
来自主题: Military版 - c++ thread 求助 (转载)
不好意思。的确在学校。
我的想法是建立一个map KeyLineNum_ValueOutput.
只要定义好了 < operator, 这个就是自动安LineNum排序的。 等所有行都处理完了就
可以输出了。不过这样搞感觉浪费内存。
不是很明白这个linked list 可以如何一边计算一边保持原来的顺序用一个thread输出
a*i
发帖数: 126
28
来自主题: Military版 - c++ thread 求助 (转载)
对,这个map只能保证有序,不能保证连续。
只有都处理完,才能保证连续.
Linked list 的意思就是每个thread输出结果时,自己保证有序插入.
不过, 我觉得你的map比list 好, 这个buffer用map比较好。
w**********5
发帖数: 1741
29
forger: 再说加拿大犹太人是怎么比别人都有钱的 https://www.ccthere.com/thread
/4210738
t**g
发帖数: 784
30
https://www.reddit.com/r/aznidentity/comments/5orkfi/my_views_about_what_is_
going_on_with_abcs_their/
你可以怀疑楼主的动机与身份,但几乎所有的回帖都认同楼主的观点。整个thread简直
就是个血泪诉苦大会,很震撼。
z***t
发帖数: 10817
31
【 以下文字转载自 Military 讨论区 】
发信人: zlltt (我要去WestWorld), 信区: Military
标 题: Re: 奥斯卡最佳电影提名 Phantom Thread
发信站: BBS 未名空间站 (Sat Mar 3 10:05:52 2018, 美东)
你是就看了个trailer就瞎咧咧
鼓吹老婆下毒蘑菇毒老公是真爱
神马啊
最多拿个best costume 服装是做得挺好的
n*********n
发帖数: 5605
32
Would like to help my friend to post a for sale thread.
Thanks !
m**u
发帖数: 632
33
来自主题: Automobile版 - 请推荐一个rebuild thread的工具
有一个stud上的thread坏了,用什么工具方便?
m**u
发帖数: 632
34
来自主题: Automobile版 - 请推荐一个rebuild thread的工具
就是stud,用tap and die是不是实际是吧原来的thread都弄掉了然后重新搞一套,可
能就比原来小一号了吧
但是我看tap and die的工具都需要一定操作空间吧,我车那个地方很窄,进不去啊

tapping
H*****u
发帖数: 1766
35
来自主题: Automobile版 - 请推荐一个rebuild thread的工具
如果不是关键部位、不太会再修的话,可以试试permanent thread locker,万一需要
再修的话可能可以用电吹风吹掉
L********0
发帖数: 476
36
来自主题: Automobile版 - 请推荐一个rebuild thread的工具
空间太小就不太好弄。一般如果你tap过thread的话就知道,这活对用力方向什么的要
求非常高,一不小心就tap歪了。所以一般都是把东西拆下来拿进屋用vise夹好了搞。
你可以试试用磁铁+socket+电钻的方法,我没试过,据说可行。
e**u
发帖数: 409
37
来自主题: JobHunting版 - solid C# Multi Threading developer in LA area
收到一个recruiter的询问
I have a client in LA area who needs a solid C# Multi Threading developer。
有兴趣的请站内联系
e**c
发帖数: 95
38
muliti-process 之间的communication 和multi- threads之间的 communications有什么不同?
看了半天, 没太明白.
Z*****Z
发帖数: 723
39
扔块板儿砖:thread之间是共享内存的,所以通信可以用shared memory,semaphore。
process有独立的内存空间,所以上述方法不适用,取而代之的是信号、文件读写、soc
ket

有什么不同?
h******3
发帖数: 351
40
inter-process communication is managed through operation system, while inter
-thread communication is through shared data structure within a process.

什么不同?
b***u
发帖数: 12010
41
来自主题: JobHunting版 - 哪里能找到multi threading的面试题?
就是有的公司专门问multi threading。这方面的题好像不那么容易找。有没有什么办
法?书?
n******2
发帖数: 47
42
来自主题: JobHunting版 - multi thread复习请教
this ?
POSIX Threads Programming - from Lawrence Livermore National Laboratory
https://computing.llnl.gov/tutorials/pthreads/
B*******1
发帖数: 2454
43
来自主题: JobHunting版 - multi thread复习请教
Can you share some interview question of the multi thread?

,
k*******d
发帖数: 1340
44
来自主题: JobHunting版 - multi thread复习请教
Doc of Boost::thread is also good
And it is portable between Linux and Windows
o****p
发帖数: 34
45
来自主题: JobHunting版 - multi thread复习请教
如果是和微软有关的,推荐一个学习多线程的网址,
http://www.albahari.com/threading/
r******d
发帖数: 308
46
来自主题: JobHunting版 - multi thread复习请教
今天又面了个新的multithread的问题
题目是:说说你对multithread的理解。 thread Synchronization 都有什么method.
我答的Synchronization有mutex 和semaphore 两种方式。在那解释了一堆。。。。
回来发现, 似乎linux的ptread里面有mutex, join 和 condition varibles....
有没有熟悉的同学帮忙确定下答案对不对?
都是c#毒害的, c#里面也有join, 我怎么就没有想起来呢。。。。 看来看的东西还是
得针对题目准备, 仔细想想Synchronization的方法很多, 思路都很简单, 但是不同
的os似乎归纳得不一样, 郁闷, 看来得准备个C#的答案和c++的答案
l*******o
发帖数: 791
47
来自主题: JobHunting版 - multi-threading guru们
多线程的情况下好像不能保证想要的顺序,因为这是有操作系统的调度来决定。一个笨
办法好像是强制让一个thread睡眠一段时间,利用这段时间完成另一端,从而保证了按
照一个既定顺序。
x*****p
发帖数: 1707
48
来自主题: JobHunting版 - multi-threading guru们
In Java, you have two waits to control.
1. Use wait-notify pairs to control the order of tasks
2. In concurrent package, use scheduled thread pool.
I**A
发帖数: 2345
49
来自主题: JobHunting版 - multi-threading guru们
不行的话,我就试试这个笨法子。。。
我想了一下,要解决我的这个问题,貌似必须创建独立的thread,而且调控要it们,太
麻烦了
j*****u
发帖数: 1133
50
来自主题: JobHunting版 - multi-threading guru们
it depends on the behavior you want
do you want the caller to be blocked in m2 and notified when m1 is done?
or do you want m2 to return to caller immediately?
both are pretty easy to implement with some thread sync approeach.
blocking is bad, usually.
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)