MiraiForum

    • Register
    • Login
    • Search
    • Popular
    • Recent
    • Unsolved
    • Tags
    • Groups
    • 友情链接

    想用多线程

    开发交流
    3
    4
    418
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • 家
      家里啊黄 last edited by

      想用线程池去处理监听,但是我不知道具体怎么实现,各位大佬能点拨一下吗

      1 Reply Last reply Reply Quote 0
      • StageGuard
        StageGuard last edited by

        val executors = Executors.newFixedThreadPool(3)
        bot.eventChannel.subscribeAlways<MessageEvent>(executors.asCoroutineDispatcher()) {
        
        }
        
        1 Reply Last reply Reply Quote 0
        • C
          CuteReimu last edited by

          所以为啥要用线程池,kotlin协程不香吗

          家 1 Reply Last reply Reply Quote 0
          • 家
            家里啊黄 @CuteReimu last edited by

            @CuteReimu 我是Java

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            Powered by Mamoe Technologies & NodeBB | 友情链接 | 服务监控 | Contact