iOS-GCD学习总结

1、前言

GCD的学习中一定要理解任务,同步、异步,串行、并发的概念,以及他们之间相互结合运行的效果。

2、GCD的基本概念

  • 任务:任务就是将要在线程中执行的代码,用block快封装好,添加到指定的执行方式,等待CPU从队列中取出任务放到对应的线程中执行。
  • 同步:任务一个接着一个的执行,前一个执行完,后一个才开始执行;不开启新的线程。
  • 异步:任务同一时间可以一起执行;开启多个新的线程。
  • 队列:装在线程任务的队形结构,有串行队列和并发队列两种队列。
  • 并发队列:线程可以同一时间一起执行。
  • 串行队列:线程只能依次有序的执行。

3、队列的创建方法

队列的创建方法是使用:

dispatch_queue_create(const char *_Nullable label, dispatch_queue_attr_t _Nullable attr)

函数创建一个队列对象。
第一个参数表示队列的唯一标识符,第二个参数用于指定队列是串行队列(DISPATCH_QUEUE_SERIAL) 还是并发队列(DISPATCH_QUEUE_CONCURRENT)。

串行队列的创建方法:

dispatch_queue_t queue = dispatch_queue_create("com.gcd.serail", DISPATCH_QUEUE_SERIAL);

并发队列的创建方法:

dispatch_queue_t queue = dispatch_queue_create("com.gcd.concurrent", DISPATCH_QUEUE_CONCURRENT);

其它两个队列:

  • 主队列:主队列负责在主线程上调度任务,如果主线程上已经有任务在执行,主队列等待主线程上任务执行完后在调度任务执行。
    主队列获取方法:

    dispatch_queue_t mainQueue = dispatch_get_main_queue();
    
  • 全局并发队列:全局并发队列是系统为了方便使用对线程,提供的一个并发队列。
    全局并发队列的获取方法:

    dispatch_queue_t globalQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)
    

    全局并发队列获取方法第一个参数表示队列的优先级,第二个参数是扩展位,可以写入任意值,没有实际意义。

4、同步、异步任务的创建方法

同步任务:
同步任务创建函数如下:

dispatch_sync(dispatch_queue_t queue, DISPATCH_NOESCAPE dispatch_block_t block)

第一个参数为任务需要添加到的队列,第二个参数为需要执行的任务。
同步任务不会开启新的线程。

异步任务:
异步任务创建函数如下:

 dispatch_async(dispatch_queue_t queue, dispatch_block_t block)

第一个参数为任务需要添加到的队列,第二个参数为需要执行的任务。
异步任务会开启新的线程。

5、GCD的使用方法

GCD的使用由多种队列(主队列、并发队列、串行队列)和两种执行方式(同步、异步)进行结合。因此有多种组合方式:

并发异步:
并发异步开启多个线程,多任务交替执行。

dispatch_queue_t queue = dispatch_queue_create("com.gcddemo.asyncconcurrent", DISPATCH_QUEUE_CONCURRENT);

dispatch_async(queue, ^{
    for (int index = 0; index < 5; index ++) {
        NSLog(@"asyncIndex: 1-%d, currentThread: %@", index, [NSThread currentThread]);
    }
});


dispatch_async(queue, ^{
    for (int index = 0; index < 5; index ++) {
        NSLog(@"asyncIndex: 2-%d, currentThread: %@", index, [NSThread currentThread]);
    }
});

输出结果:

2017-07-29 18:34:52.401 GCDDemo[22711:165644] asyncIndex: 1-0, currentThread: <NSThread: 0x60800007f400>{number = 3, name = (null)}
2017-07-29 18:34:52.401 GCDDemo[22711:165630] asyncIndex: 2-0, currentThread: <NSThread: 0x6000000754c0>{number = 4, name = (null)}
2017-07-29 18:34:52.402 GCDDemo[22711:165644] asyncIndex: 1-1, currentThread: <NSThread: 0x60800007f400>{number = 3, name = (null)}
2017-07-29 18:34:52.402 GCDDemo[22711:165630] asyncIndex: 2-1, currentThread: <NSThread: 0x6000000754c0>{number = 4, name = (null)}
2017-07-29 18:34:52.402 GCDDemo[22711:165644] asyncIndex: 1-2, currentThread: <NSThread: 0x60800007f400>{number = 3, name = (null)}
2017-07-29 18:34:52.402 GCDDemo[22711:165630] asyncIndex: 2-2, currentThread: <NSThread: 0x6000000754c0>{number = 4, name = (null)}
2017-07-29 18:34:52.402 GCDDemo[22711:165644] asyncIndex: 1-3, currentThread: <NSThread: 0x60800007f400>{number = 3, name = (null)}
2017-07-29 18:34:52.402 GCDDemo[22711:165630] asyncIndex: 2-3, currentThread: <NSThread: 0x6000000754c0>{number = 4, name = (null)}
2017-07-29 18:34:52.402 GCDDemo[22711:165644] asyncIndex: 1-4, currentThread: <NSThread: 0x60800007f400>{number = 3, name = (null)}
2017-07-29 18:34:52.402 GCDDemo[22711:165630] asyncIndex: 2-4, currentThread: <NSThread: 0x6000000754c0>{number = 4, name = (null)}

从输出结果上可以看出上述例子创建了两个分线程,交替的执行任务。

并发同步:
任务按顺序执行,不开启新的线程。

dispatch_queue_t queue = dispatch_queue_create("com.gcddemo.syncconcurrent", DISPATCH_QUEUE_CONCURRENT);

dispatch_sync(queue, ^{
        for (int index = 0; index < 5; index ++) {
        NSLog(@"syncIndex: 1-%d, currentThread: %@", index, [NSThread currentThread]);
    }
});

dispatch_sync(queue, ^{
    for (int index = 0; index < 5; index ++) {
        NSLog(@"syncIndex: 2-%d, currentThread: %@", index, [NSThread currentThread]);
    }
});

输出结果:

2017-07-29 18:36:26.243 GCDDemo[22711:165589] syncIndex: 1-0, currentThread: <NSThread: 0x600000072940>{number = 1, name = main}
2017-07-29 18:36:26.243 GCDDemo[22711:165589] syncIndex: 1-1, currentThread: <NSThread: 0x600000072940>{number = 1, name = main}
2017-07-29 18:36:26.244 GCDDemo[22711:165589] syncIndex: 1-2, currentThread: <NSThread: 0x600000072940>{number = 1, name = main}
2017-07-29 18:36:26.244 GCDDemo[22711:165589] syncIndex: 1-3, currentThread: <NSThread: 0x600000072940>{number = 1, name = main}
2017-07-29 18:36:26.244 GCDDemo[22711:165589] syncIndex: 1-4, currentThread: <NSThread: 0x600000072940>{number = 1, name = main}
2017-07-29 18:36:26.244 GCDDemo[22711:165589] syncIndex: 2-0, currentThread: <NSThread: 0x600000072940>{number = 1, name = main}
2017-07-29 18:36:26.245 GCDDemo[22711:165589] syncIndex: 2-1, currentThread: <NSThread: 0x600000072940>{number = 1, name = main}
2017-07-29 18:36:26.245 GCDDemo[22711:165589] syncIndex: 2-2, currentThread: <NSThread: 0x600000072940>{number = 1, name = main}
2017-07-29 18:36:26.245 GCDDemo[22711:165589] syncIndex: 2-3, currentThread: <NSThread: 0x600000072940>{number = 1, name = main}
2017-07-29 18:36:26.245 GCDDemo[22711:165589] syncIndex: 2-4, currentThread: <NSThread: 0x600000072940>{number = 1, name = main}

输出结果上可以看到当前的线程为主线程,并没有开启新的线程,任务按先后顺序执行。

串行异步:
只开启一条分线程,任务按照循序执行。

dispatch_queue_t queue = dispatch_queue_create("com.gdcdemo.asyncserail", DISPATCH_QUEUE_SERIAL);

dispatch_async(queue, ^{
    for (int index = 0; index < 5; index ++) {
        NSLog(@"asyncserialIndex: 1-%d, currentThread: %@", index, [NSThread currentThread]);
    }
});

dispatch_async(queue, ^{
    for (int index = 0; index < 5; index ++) {
        NSLog(@"asyncserialIndex: 2-%d, currentThread: %@", index, [NSThread currentThread]);
    }
});

输出结果:

2017-07-29 18:41:29.923 GCDDemo[23359:171236] asyncserialIndex: 1-0, currentThread: <NSThread: 0x60000007cd00>{number = 3, name = (null)}
2017-07-29 18:41:29.923 GCDDemo[23359:171236] asyncserialIndex: 1-1, currentThread: <NSThread: 0x60000007cd00>{number = 3, name = (null)}
2017-07-29 18:41:29.923 GCDDemo[23359:171236] asyncserialIndex: 1-2, currentThread: <NSThread: 0x60000007cd00>{number = 3, name = (null)}
2017-07-29 18:41:29.924 GCDDemo[23359:171236] asyncserialIndex: 1-3, currentThread: <NSThread: 0x60000007cd00>{number = 3, name = (null)}
2017-07-29 18:41:29.924 GCDDemo[23359:171236] asyncserialIndex: 1-4, currentThread: <NSThread: 0x60000007cd00>{number = 3, name = (null)}
2017-07-29 18:41:29.924 GCDDemo[23359:171236] asyncserialIndex: 2-0, currentThread: <NSThread: 0x60000007cd00>{number = 3, name = (null)}
2017-07-29 18:41:29.924 GCDDemo[23359:171236] asyncserialIndex: 2-1, currentThread: <NSThread: 0x60000007cd00>{number = 3, name = (null)}
2017-07-29 18:41:29.924 GCDDemo[23359:171236] asyncserialIndex: 2-2, currentThread: <NSThread: 0x60000007cd00>{number = 3, name = (null)}
2017-07-29 18:41:29.924 GCDDemo[23359:171236] asyncserialIndex: 2-3, currentThread: <NSThread: 0x60000007cd00>{number = 3, name = (null)}
2017-07-29 18:41:29.925 GCDDemo[23359:171236] asyncserialIndex: 2-4, currentThread: <NSThread: 0x60000007cd00>{number = 3, name = (null)}

从输出结果上可以看出,上述例子值创建了一条分线程,任务按照先后循序执行。

串行同步:
任务按先后循序执行,不开启新的线程。

dispatch_queue_t queue = dispatch_queue_create("com.gcddemo.syncserail", DISPATCH_QUEUE_SERIAL);

dispatch_sync(queue, ^{
    for (int index = 0; index < 5; index ++) {
        NSLog(@"syncserialIndex: 1-%d, currentThread: %@", index, [NSThread currentThread]);
    }
});

dispatch_sync(queue, ^{
    for (int index = 0; index < 5; index ++) {
        NSLog(@"syncserialIndex: 2-%d, currentThread: %@", index, [NSThread currentThread]);
    }
});

输出结果:

2017-07-29 18:47:04.147 GCDDemo[23910:176279] syncserialIndex: 1-0, currentThread: <NSThread: 0x60000006c400>{number = 1, name = main}
2017-07-29 18:47:04.147 GCDDemo[23910:176279] syncserialIndex: 1-1, currentThread: <NSThread: 0x60000006c400>{number = 1, name = main}
2017-07-29 18:47:04.147 GCDDemo[23910:176279] syncserialIndex: 1-2, currentThread: <NSThread: 0x60000006c400>{number = 1, name = main}
2017-07-29 18:47:04.147 GCDDemo[23910:176279] syncserialIndex: 1-3, currentThread: <NSThread: 0x60000006c400>{number = 1, name = main}
2017-07-29 18:47:04.148 GCDDemo[23910:176279] syncserialIndex: 1-4, currentThread: <NSThread: 0x60000006c400>{number = 1, name = main}
2017-07-29 18:47:04.148 GCDDemo[23910:176279] syncserialIndex: 2-0, currentThread: <NSThread: 0x60000006c400>{number = 1, name = main}
2017-07-29 18:47:04.148 GCDDemo[23910:176279] syncserialIndex: 2-1, currentThread: <NSThread: 0x60000006c400>{number = 1, name = main}
2017-07-29 18:47:04.148 GCDDemo[23910:176279] syncserialIndex: 2-2, currentThread: <NSThread: 0x60000006c400>{number = 1, name = main}
2017-07-29 18:47:04.148 GCDDemo[23910:176279] syncserialIndex: 2-3, currentThread: <NSThread: 0x60000006c400>{number = 1, name = main}
2017-07-29 18:47:04.148 GCDDemo[23910:176279] syncserialIndex: 2-4, currentThread: <NSThread: 0x60000006c400>{number = 1, name = main}

从输出结果上可以看出任务按照先后循序在主线程上执行,没有开启新的线程。

主队列异步:
任务按先后顺序在主线程中执行。

dispatch_queue_t queue = dispatch_get_main_queue();

dispatch_async(queue, ^{
    for (int index = 0; index < 5; index ++) {
        NSLog(@"asyncMianIndex: 1-%d, currentThread: %@", index, [NSThread currentThread]);
    }
});

dispatch_async(queue, ^{
    for (int index = 0; index < 5; index ++) {
        NSLog(@"asyncMianIndex: 2-%d, currentThread: %@", index, [NSThread currentThread]);
    }
});

输出结果:

2017-07-31 09:48:54.844 GCDDemo[7385:64936] asyncMianIndex: 1-0, currentThread: <NSThread: 0x608000261580>{number = 1, name = main}
2017-07-31 09:48:54.844 GCDDemo[7385:64936] asyncMianIndex: 1-1, currentThread: <NSThread: 0x608000261580>{number = 1, name = main}
2017-07-31 09:48:54.844 GCDDemo[7385:64936] asyncMianIndex: 1-2, currentThread: <NSThread: 0x608000261580>{number = 1, name = main}
2017-07-31 09:48:54.844 GCDDemo[7385:64936] asyncMianIndex: 1-3, currentThread: <NSThread: 0x608000261580>{number = 1, name = main}
2017-07-31 09:48:54.844 GCDDemo[7385:64936] asyncMianIndex: 1-4, currentThread: <NSThread: 0x608000261580>{number = 1, name = main}
2017-07-31 09:48:54.845 GCDDemo[7385:64936] asyncMianIndex: 2-0, currentThread: <NSThread: 0x608000261580>{number = 1, name = main}
2017-07-31 09:48:54.845 GCDDemo[7385:64936] asyncMianIndex: 2-1, currentThread: <NSThread: 0x608000261580>{number = 1, name = main}
2017-07-31 09:48:54.845 GCDDemo[7385:64936] asyncMianIndex: 2-2, currentThread: <NSThread: 0x608000261580>{number = 1, name = main}
2017-07-31 09:48:54.845 GCDDemo[7385:64936] asyncMianIndex: 2-3, currentThread: <NSThread: 0x608000261580>{number = 1, name = main}
2017-07-31 09:48:54.845 GCDDemo[7385:64936] asyncMianIndex: 2-4, currentThread: <NSThread: 0x608000261580>{number = 1, name = main}

从输出结果可以去看出,任务按照先后循序,在主线程上执行。

主队列同步:
在主队列执行同步任务时,由于任务之间相互等待,会造成崩溃。

dispatch_queue_t queue = dispatch_get_main_queue();
dispatch_sync(queue, ^{
    for (int index = 0; index <= 10; index ++) {
        NSLog(@"syncMainIndex: 1-%d, currentThread: %@", index, [NSThread currentThread]);
    }
});

dispatch_sync(queue, ^{
    for (int index = 0; index <= 10; index ++) {
        NSLog(@"syncMainIndex: 2-%d, currentThread: %@", index, [NSThread currentThread]);
    }
});

代码执行的顺序不是从上到下,而是先执行外部的代码,发现有两个同步任务加载到主队列,立即去执行两个同步任务,由于任务执行需要等到另外一个任务执行完才可以,两个任务就相互等待,最终造成崩溃。

上述总结:

串行 并发 主队列
同步 不开启新的线程 不开启新的线程 线程崩溃
异步 开启一条新的线程 开启多条新的线程 不开启新的线程,在主线程执行任务

6、其他GCD函数

延时函数:
GCD延时创建方法:

dispatch_after(dispatch_time_t when, dispatch_queue_t queue, dispatch_block_t block)

第一个参数是延时的时间,第二参数是加载任务的队列,第三个参数是延时结束后执行的任务。

dispatch_queue_t queue = dispatch_get_main_queue();
dispatch_time_t time = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC));
dispatch_after(time, queue, ^{
    NSLog(@"after 3s, currentThread: %@", [NSThread currentThread]);
});

上述列子中创建了一个延时时间从当前时间开始延时3秒,将任务加载到最队列中去,当延时结束在主线程中执行任务。

栅栏:
队列加载栅栏函数携带的任务时,队列中的其他任务要等待栅栏函数中的任务执行结束才可以执行。
通过该功能可以实现不同线程任务执行的先后顺序以及实现锁的功能。
栅栏函数不要放到主队列以及全局并发队列中。运用栅栏函数一定要预防卡线程。

dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);

dispatch_async(queue, ^{
    NSLog(@"berrier index 1, currentThread: %@", [NSThread currentThread]);
});

dispatch_async(queue, ^{
    NSLog(@"berrier index 2, currentThread: %@", [NSThread currentThread]);
});

dispatch_barrier_async(queue, ^{
    NSLog(@"current thread: %@", [NSThread currentThread]);
});

dispatch_async(queue, ^{
    NSLog(@"berrier index 3, currentThread: %@", [NSThread currentThread]);
});

上述例子输出结果:

2017-07-31 10:49:44.534 GCDDemo[12353:106669] berrier index 2, currentThread: <NSThread: 0x608000076bc0>{number = 7, name = (null)}
2017-07-31 10:49:44.534 GCDDemo[12353:113335] berrier index 1, currentThread: <NSThread: 0x60000006ba40>{number = 6, name = (null)}
2017-07-31 10:49:44.534 GCDDemo[12353:113336] current thread: <NSThread: 0x60000006edc0>{number = 8, name = (null)}
2017-07-31 10:49:44.534 GCDDemo[12353:113337] berrier index 3, currentThread: <NSThread: 0x600000078180>{number = 9, name = (null)}

输出结果上可以看到开启了多条新的线程,将任务分成两组,第一组执行结束后才执行第二组任务。

once函数:
dispatch_once多用于单例的创建,下属代码执行一次后,再次执行不会有log打印输出。

static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
      NSLog(@"once, current thread: %@", [NSThread currentThread]);
});

队列组:
队列组的创建方法如下:

dispatch_group_t group = dispatch_group_create()

队列组是将加载任务的队列放到队列组中,当队列中的任务执行完后,执行如下方法:

dispatch_group_notify(dispatch_group_t group, dispatch_queue_t queue, dispatch_block_t block)

如合成网络图片及其他需要在分线程中工作,等待个线程完成工作后才执行的任务。

__block int a = 0, b = 0, c = 0;

dispatch_group_t group = dispatch_group_create();
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);

dispatch_group_async(group, queue, ^{
    NSLog(@"dispath-group index: 1, current thread: %@", [NSThread currentThread]);
    a = 1;
});

dispatch_group_async(group, queue, ^{
    NSLog(@"dispath-group index: 2, current thread: %@", [NSThread currentThread]);
    b = 3;
});

dispatch_group_async(group, queue, ^{
    NSLog(@"dispath-group index: 3, current thread: %@", [NSThread currentThread]);
    c = 5;
});

dispatch_group_notify(group, dispatch_get_main_queue(), ^{
    NSLog(@"group-notify current thread: %@", [NSThread currentThread]);
    NSLog(@"a + b + c = %d", a + b + c);
});

上述例子输出结果如下:

2017-07-31 10:41:58.992 GCDDemo[12353:106684] dispath-group index: 1, current thread: <NSThread: 0x608000075ec0>{number = 3, name = (null)}
2017-07-31 10:41:58.992 GCDDemo[12353:106671] dispath-group index: 2, current thread: <NSThread: 0x608000075d80>{number = 4, name = (null)}
2017-07-31 10:41:58.992 GCDDemo[12353:106668] dispath-group index: 3, current thread: <NSThread: 0x608000075c00>{number = 5, name = (null)}
2017-07-31 10:41:58.993 GCDDemo[12353:106620] group-notify current thread: <NSThread: 0x600000066bc0>{number = 1, name = main}
2017-07-31 10:41:58.993 GCDDemo[12353:106620] a + b + c = 9

从输出结果上可以看出对a、b、c的赋值分别是在不同的线程中完成的,各个线程赋值结束后在回到主线程对a、b、c进行加法运算。

快速迭代:
快速迭代可以同时遍历多个数字,多用于循环量特别大的操作中。如加载相册图片,当图片有上百张的时候可能会造成卡顿现象,就可以使用快速迭代的方法。

dispatch_apply(10, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^(size_t index) {
    NSLog(@"apply index: %zu, current thread: %@", index, [NSThread currentThread]);
});

输出结果如下:

2017-07-31 11:14:51.059 GCDDemo[12353:106620] apply index: 0, current thread: <NSThread: 0x600000066bc0>{number = 1, name = main}
2017-07-31 11:14:51.059 GCDDemo[12353:106669] apply index: 1, current thread: <NSThread: 0x608000076bc0>{number = 7, name = (null)}
2017-07-31 11:14:51.059 GCDDemo[12353:131416] apply index: 2, current thread: <NSThread: 0x608000077240>{number = 13, name = (null)}
2017-07-31 11:14:51.059 GCDDemo[12353:131417] apply index: 3, current thread: <NSThread: 0x608000077540>{number = 14, name = (null)}
2017-07-31 11:14:51.059 GCDDemo[12353:106620] apply index: 4, current thread: <NSThread: 0x600000066bc0>{number = 1, name = main}
2017-07-31 11:14:51.059 GCDDemo[12353:131416] apply index: 6, current thread: <NSThread: 0x608000077240>{number = 13, name = (null)}
2017-07-31 11:14:51.059 GCDDemo[12353:106669] apply index: 5, current thread: <NSThread: 0x608000076bc0>{number = 7, name = (null)}
2017-07-31 11:14:51.059 GCDDemo[12353:131417] apply index: 7, current thread: <NSThread: 0x608000077540>{number = 14, name = (null)}
2017-07-31 11:14:51.059 GCDDemo[12353:106620] apply index: 8, current thread: <NSThread: 0x600000066bc0>{number = 1, name = main}
2017-07-31 11:14:51.059 GCDDemo[12353:131416] apply index: 9, current thread: <NSThread: 0x608000077240>{number = 13, name = (null)}

从输出结果上可以看出该函数开启了多条新的线程,进行数字的遍历操作。

7、总结

GCD的使用过程是指定任务的执行方法(同步、异步),并把任务添加到串行队列或者并发队列中,通过CPU调度执行。
上述只是GCD的基本使用方法,具体要结合使用环境,灵活运用。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 156,265评论 4 359
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 66,274评论 1 288
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 106,087评论 0 237
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 43,479评论 0 203
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 51,782评论 3 285
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 40,218评论 1 207
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 31,594评论 2 309
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 30,316评论 0 194
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 33,955评论 1 237
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 30,274评论 2 240
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 31,803评论 1 255
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 28,177评论 2 250
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 32,732评论 3 229
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 25,953评论 0 8
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 26,687评论 0 192
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 35,263评论 2 267
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 35,189评论 2 258

推荐阅读更多精彩内容