-
CoStream 无缓存 Pipe Stream
翻译 maninwest@Codeforge 作者:Sergey Nozhenko@CodeProject介绍:CoStream 是的 PipeStream 无缓存替代选择。背景在生产者/消费者模式下,如果我们知道一个消费者确定要读取stream 读到结束或者如果不能读到结束就处理,那么同步stream 就不需要维护自己的内部缓存,完全依赖于 Read 方法调用者的缓存。在Read 方法中,CoStream 保存到目标缓存的引用并等待,直至完成。而 write 方法从源缓存中复制数据到目标缓存,会给读取者发送信号缓存已准备就绪或者需要等待期 Read 调用(如果来源缓存中有未消耗的数据剩下或者返回到Writer 调用者)。使用代码CoStream 不能在单个话题中使用。应该至少有两个,读取和写入话题。两者都需要关闭(或处理)stream,一边对方可以继续到结束。测试程序在 XmlDocument 中加载了一些 xml 文件。然后将其写入到 CoStream 的实例Static CoStream costream = new TestCoStream();
static string outpath;
static void Main(string[] args)
{
// ...
XmlDocument doc = new XmlDocument();
doc.Load(args[0]);
outpath = args[1];
var reading_thread = new Thread(ReaderBody);
reading_thread.Start();
using (var pipe = XmlWriter.Create(costream, new XmlWriterSettings { CloseOutput = true }))
doc.Save(pipe);
reading_thre
- 2022-03-17 17:34:17下载
- 积分:1
-
打字训练游戏,它是打字训练游戏的极品,好玩至极,精彩不容错过。...
打字训练游戏,它是打字训练游戏的极品,好玩至极,精彩不容错过。-Typing training game, it is the best typing training game, extremely fun, excitement should not be missed.
- 2022-04-01 20:51:24下载
- 积分:1
-
本期刊是微软技术俱乐部内部期刊,只限微软技术俱乐部会员、MS center网站成员订阅。微软技术俱乐部电子期刊为月刊,每月第二周发布。期刊内容包括原俱乐部动态、
本期刊是微软技术俱乐部内部期刊,只限微软技术俱乐部会员、MS center网站成员订阅。微软技术俱乐部电子期刊为月刊,每月第二周发布。期刊内容包括原俱乐部动态、心声告白、团队建设、技术天地以及心得感悟-The Journal of the club-house Microsoft technical journals, are available only to club members on Microsoft technology, MS center members subscription site. Microsoft Technology Club for the monthly electronic journal, published the second week of each month. Journal of dynamic content including the original club, voice of confession, team building, technology and experience the world sentiment
- 2022-10-10 01:15:02下载
- 积分:1
-
代码用Verilog可发现中值写作。用一个C++文件看…
A code writing by Verilog which can find medium value. With a C file to see the simulation results. A co-design example of C and Verilog.
- 2022-10-23 17:50:08下载
- 积分:1
-
BNB,一个简单的泡泡堂游戏,没有加入人工智能,有碰撞检测
BNB,一个简单的泡泡堂游戏,没有加入人工智能,有碰撞检测-BNB, BNB a simple game, without adding artificial intelligence, there is collision detection
- 2023-03-25 17:25:03下载
- 积分:1
-
一个监视器的疑难解答
故障排除您的监视器,当它获取投诉在下列情况下的简单步骤:Monitoris 空白将显示器连接后重新启动系统后,这幅画看坏显示器具有 startedmaking 显示器显示 settingsare 不正确显示旋转一个奇怪的声音
- 2022-04-17 01:28:26下载
- 积分:1
-
j2me写的炸弹人源码,很小以前在FC机子上玩的炸弹人,就是那个炸兔子的。...
j2me写的炸弹人源码,很小以前在FC机子上玩的炸弹人,就是那个炸兔子的。-The bombs were to write j2me source code, a small machine on the previous play FC bomb people is that deep-fried rabbit.
- 2022-08-18 20:32:10下载
- 积分:1
-
基于VB.NET开发的与RS232串口通信的编程实例,适用于开发者参考...
基于VB.NET开发的与RS232串口通信的编程实例,适用于开发者参考-on VB.NET development and RS232 serial communication programming examples, application developers to reference
- 2022-01-22 16:01:00下载
- 积分:1
-
基于VC6.0的opengl室内场景图
利用opengl库在VC下的一个室内的场景图,运用到了贴图技术,有沙发,落地灯,桌子,还有一个万花筒,很适合初学者,而且代码易看懂哟。。。
- 2022-11-29 03:10:04下载
- 积分:1
-
这是一个C语言的格式化工具,可以调整程序,保存程序…
这是一个C语言格式化工具,可以节省编程人员调整程序格式的时间,只要导入点击格式化就OK了。-This is a C language formatting tools, you can adjust the procedure to save programmers time format, as long as the import format click on OK.
- 2022-02-25 01:25:46下载
- 积分:1